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
By br0t · 2013-01-18
brokanteur · 2018-07-26
barigazy · 2013-01-18