View Full Version : Change text color in rollout?

01 January 2009, 09:54 AM
Is there any way to change the text color in a rollout? Or to make the font bold? Maybe somehow with using .Net? But I don't want a separate frame/window around the text that .Net usually creates....


01 January 2009, 12:55 PM
You could render your own text to a bitmap and use an imgtag to place it... but that's craziness ;)

If max's windows messaging was a bit mor powerful, you would be able to adjust the font (in windows control terminology, a font is the font face, bold/italic/underline/etc. states, size, color in one) on the control directly..

But I think your best bet is still a .NET control. All you have to do is match the background color it uses by default to the background color 3ds Max uses:

rollout roll_test "test" (
dotNetControl dnc_label "Windows.Forms.Label"

on roll_test open do (
dnc_label.text = "Hello World"
local bkgCol = (colorman.getcolor #background * 255) as color
dnc_label.backColor = (dotNetClass "System.Drawing.Color").fromArgb bkgCol.r bkgCol.g bkgCol.b
createDialog roll_test

The rectangle behind the label still exists - but you can't see it as it matches the surrounding background color.

01 January 2009, 01:40 PM
If you just need another color (not another font/fontstyle) you could also use the hyperlink control. Set its .enabled property to false so it doesn't repond to any mouse/keyboard events, and the .color property to adjust its fore color.


01 January 2009, 03:36 PM
Sweet! Both solutions work great. Thanks

CGTalk Moderation
01 January 2009, 03:36 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.