PaletteInheritance property on NDataGridView


Author
Message
Brad Swearingen
Brad Swearingen
Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)
Group: Forum Members
Posts: 53, Visits: 3

1) I dropped a NDataGridView on my NForm.  When I set the PaletteInheritance value to None it still picks up the current scheme.  I set the scheme, for instance, like this:

NUIManager.Palette.Scheme = ColorScheme.Rosemary;

If I set the PaletteInheritance to None on an NButton on the same form it doesn't use the scheme.  Is there a way to make this work on an NDataGridView?

Specifically, I was investigating why the NDataGridViews column header text forecolor was not the same color as my NButton forecolor text is.  How can I make these be the same?

2) I noticed when using the ColorSheme.Blue and ColorScheme.Longhorn that a disabled NTextBox can not be read at all.  None of the other schemes and skins have this issue.  Seems the foreground color and the background color are the same with those schemes.  Is there a way to use those schemes and make the NTextBox readable?

I'm using the 11.12.14.12 build.


Reply
Brad Swearingen
Brad Swearingen
Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)Forum Guru (53 reputation)
Group: Forum Members
Posts: 53, Visits: 3

1) Yes, I'm creating the NForm with both the NButton and NDataGridView's PaletteInheritance.None set AFTER I've already assigned the NUIManager.Palette.Scheme (in this case to ColorScheme.Rosmary).  The NButton does not inherit the palette but the NDataGridView does.  Sounds like you expect this but if so it seems odd that one widget inherits and the other doesn't.

2) Thanks for the tip for the disabled NTextBox on the Blue scheme.  I was able to get that to work after also adding a NUIManager.GlobalPaletteChange event so I can keep the scheme correct should it change there after.  The key was making sure I set the Palette.Window back to the NUIManager.Palette.Window before subsequently setting it to Color.WhiteSmoke otherwise the Color.WhiteSmoke setting wouldn't take.  Seemed odd but glad that seems to work.  I used some code like the following on a NTextBox subclass during creation, EnableChanged and GlobalPaletteChange:

Palette.Scheme = NUIManager.Palette.Scheme;

if (!Enabled)

{

if ((Palette.Scheme == ColorScheme.Blue) || (Palette.Scheme == ColorScheme.Longhorn))

{

Palette.Window = NUIManager.Palette.Window;

Palette.Window = Color.WhiteSmoke;

}

}

else

{

Palette.Window = NUIManager.Palette.Window;

}


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search