Modifying the BackColor for the NTextBox


https://www.nevron.com/Forum/Topic8970.aspx
Print Topic | Close Window

By Volker Kunze - 9 Years Ago
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 - 9 Years Ago
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 - 9 Years Ago
That was helpful, thank you very much!