Notifications
Clear all

[Closed] MaxScript…inside dotnet ? Rollouts width

Hi all,

I’d like to do a rollout that I can resize vertically and horizontally but…

I am a bit anoyed by this
http://docs.autodesk.com/3DSMAX/15/ENU/MAXScript-Help/index.html?url=files/GUID-A72112A6-BDFB-47A6-88FB-8D49C4CBD049.htm,topicNumber=d30e618546

It’s weirdly only talking about vertical and no traces nowhere of a horizontal one…

So by digging a bit I have find I could achieve that using DotNet BUT… From what I have seen so far all my code in maxscript using good old listbox buttons spinners wont be compatible with…
It seems a lot of work only for this small feature and I have think using a spinner or slider for resizing the width of my rollout would be good as well but… even if I put successfully my width inside a variable and modify its value I havnt find any way to actually “refresh” the width of the existing rollout when changing his variable using my spinner. Is it possible or am I condemned using dotNet for a so little thing ?

Thanks

EDIT : * Actually I could extend this question about refreshing UI running. For exemple I have some Elements names thats are given by variables… and I need the UI to refresh when the variable is updated to display the correct name.

4 Replies

did you tried this ?


try(destroyDialog resizingRollout)catch()
rollout resizingRollout "resizing" width:168 height:304
(
)
createDialog resizingRollout style:#(#style_sysmenu, #style_titlebar, #style_resizing)

and this if you want subrollouts.

Thanks sinokgr : ) In between times I have find the answer and it works great (I should have edit my appologizes).

But…since we are here… I’m encountering an issue relating to this resize.
I want moving my buttons’s offset position following the offset of resizing of the rollout.
But… I am getting this error :
>> MAXScript Rollout Handler Exception:
– Unknown property: “offset” in ButtonControl:MyButton <<

…here’s my code : MyRollout.MyButton.offset = [-114,(0+BtsOffset)]

BtsOffset is well updated as it should, maxscript seems simply never find this offset property even if I find it well my button in the MyRollout.controls (just to make sure Im talking to the right button).

yep, because there is no property offset in the button. Try “pos” instead


try(destroyDialog resizingRollout)catch()
rollout resizingRollout "resizing" width:168 height:40
(
	button btn1 "Button" pos:[8,8] width:152 height:24
	
	on resizingRollout resized size do ( btn1.pos = [ size.x - 160, size.y - 32 ] )
)
createDialog resizingRollout style:#(#style_sysmenu, #style_titlebar, #style_resizing)

Button MyButton “P” width:20 height:30 align:#right offset:[-114,0]

Well, I surely can try the .pos, but the offset is well here 🙁