Notifications
Clear all

[Closed] Rollout: dotNetControl order

Hi,

Probably just something simple, but I can’t find a solution. I’ve got several dotNetControls in my rollout. Some of them are overlapping each other (a groupBox and a button for example. How can I set their order in the z direction? The button should be on top of the groupBox (otherwise it won’t be visible, or can’t be clicked).

By the way, does anyone have a solution to change the bordersize/color for a dotNet groupBox? I’d like a 1px black line, but max2008 gives me a default highlight border, while max2010 gives me a white outline (tried groupBox/GroupBoxRenderer on msdn, but can’t find a border setting).

Thanks in advance,
Martijn

2 Replies

if you use a form or page within your rollout, then you can access its .setChildIndex() method to move the controls along Z.

Within a 3ds Max rollout, I think you’re at the whim of things a bit. Try swapping the controls. E.g.


 rollout roll_test "test" width:600 height:400 (
 	dotNetControl dno_button "Windows.Forms.Button" text:"Button" width:400 height:250 pos:[32,32]
 	dotNetControl dno_group "Windows.Forms.Groupbox" text:"GroupBox" width:550 height:350 pos:[8,8]
 )
 createDialog roll_test
 

works, while


 rollout roll_test "test" width:600 height:400 (
 	dotNetControl dno_group "Windows.Forms.Groupbox" text:"GroupBox" width:550 height:350 pos:[8,8]
 	dotNetControl dno_button "Windows.Forms.Button" text:"Button" width:400 height:250 pos:[32,32]
 )
 createDialog roll_test
 

does not

Edit: oh err, no idea about the border. If it’s just invoking the windows standard groupbox UI element – which I think it is – you might have a problem… that thing’s got some major styling issues

Thanks Richard. I’ll stick to a rollout for now, so I’ll have to improvise with the swapping.
I’ll be fine with it as long as it gives the same results on different computers (although it’s not really neat, but nothing to do about that).

[edit] I’m using a rollout with a “System.Windows.Forms.ListView” control inside it now.
It gives me the max integration of the rollout, with the dotnet features of the listview. Seems to be best of both worlds at the moment. However, if anyone has a better solution, I’d love to hear it.