Nevron Forum

Modifying the BackColor for the NTextBox

https://www.nevron.com/Forum/Topic8970.aspx

By Volker Kunze - Wednesday, February 18, 2015

Hi,
I want to modify the BackColor-Property for several NTextBox-Controls to show the user that these controls are set to readonly. For the original WinForm.TextBox this property is available, but not for the NTextBox. Setting all affected TextBoxes to disabled is not very eye-friendly. Is there an elegant way to solve this?

Greetings from Hamburg
Volker
By Nevron Support - Wednesday, February 18, 2015

Hi Volker,

First you need to set NTextBox not to inherit its palette settings from the palette of its parent and then you need to set Window property of the NTextBox.Palette to the desired color:


textBox.PaletteInheritance = PaletteInheritance.None;
textBox.Palette.Window = Color.Gray;


I hope it helps.
By Volker Kunze - Friday, February 20, 2015

That was helpful, thank you very much!