Checkbutton highlightColor update trick
Hey,
I just found out a little trick that I thought might be worth sharing.
It is nice that you can set a custom highlightColor for checkbuttons inside a rollout. However, changing that color while the script runs, e.g. to reflect some user decisions like some radiobutton state, does not work so great. It will update only when you hover over the checkbutton, move the rollout off screen or toggle the checkbutton twice.
But you can force it to update by setting the caption to something different! I was happy to find that out, so maybe it is useful to someone else.
This little example explains it better:
rollout ro_checkbuttonColorUpdate "CKB color update" width:168 height:137 ( colorPicker cp_ckbColor "" pos:[59,9] width:50 height:50 color:(color 10 60 140) checkButton ckb_delayed "Color update on hover" pos:[7,70] width:154 height:28 checked:true checkButton ckb_instant "Instant color update" pos:[7,104] width:154 height:28 checked:true on cp_ckbColor changed clr do ( ckb_delayed.highlightColor = clr ckb_instant.highlightColor = clr -- force color update: ckb_instant.caption = "" ckb_instant.caption = "Instant color update" )--end on ) createDialog ro_checkbuttonColorUpdate
Cheers
Comments
thanks
very helpful, thanks a lot guys !
Resources
My half scripts on this forum are combination of mxs+dotNet (i don't use C# or any other programing language)
I learn a lot from here:
http://forums.cgsociety.org/showthread.php?f=98&t=551473
Also here you can find good stuff about all controls
.Net >>> http://msdn.microsoft.com/en-us/library/gg145045%28v=VS.110%29.aspx
DevXpress >>> http://documentation.devexpress.com/#HomePage/CustomDocument9453
And most useful mxs tool by Alexander Kramer (Track)
http://www.scriptspot.com/3ds-max/scripts/show-dotnet-properties
bga
edit
But dotNet in most cases have problem with GarbageCollections when
you play with Paint events. I stop to develop this tool because of that.
http://www.mediafire.com/download.php?abh7dddpsj8sl72
And last something that will use in the near future (max2012 and max 2013 already supports most of ctrl's) DevXpress UI controls like this funny tool http://www.scriptspot.com/3ds-max/scripts/ineractive-labels
bga
these are great links, thanks
these are great links, thanks alot branko! You did some badass GUI stuff there :D really cool to see what is possible
Never get low & slow & out of ideas
I'm glad you like it.:)
I'm glad you like it.:)
I sent you a PM with a link
bga
hehe nice tool :P yeaah
hehe nice tool :P yeaah dotNet, so powerful but I still didnt get to use it that much, dunno where to start I guess... do you know some good resources?
Never get low & slow & out of ideas
:)
Very cool trick i admit.
I love to see colored UI. MXS rollout is limited but dotNet forms and controls are not.
I play with this to get some screen color for my custom solor picker tool.
bga