PDA

View Full Version : DotNet button border color and width


Jon-Huhn
01-19-2008, 05:14 PM
Anyone know how to change the border color and width of a DotNet button? I'm working on making DotNet buttons look like their Maxscript counterparts as much as possible. I can change the background color using the .BackColor property, but I can't seem to figure out how to mess with the border.


Thanks!

RustyKnight
01-19-2008, 08:49 PM
Anyone know how to change the border color and width of a DotNet button? I'm working on making DotNet buttons look like their Maxscript counterparts as much as possible. I can change the background color using the .BackColor property, but I can't seem to figure out how to mess with the border.


Thanks!To be honest, I don't think this is REALLY what you want, but...
local appearance = btn.FlatAppearance() -- gets a FlatButtonAppearance class

local color = DotNetClass "System.Drawing.Color"

appearance.BorderColor = color.Blue
May also need to play around with the FlatStyle property to get this to work

Shane

Jon-Huhn
01-19-2008, 10:24 PM
Thanks, Shane, I'll give this a try.

So, what did you mean when you said this isn't what I really wanted... do you mean it's a bad idea to be changing the appearance of DotNet controls?

Jon-Huhn
01-20-2008, 12:19 AM
Ah, I see, you were doubting if this would work. Yeah, having problems, but I'm getting a better idea now of the things I need to be searching for on the Microsoft DotNet website.

CGTalk Moderation
01-20-2008, 12:19 AM
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.