Profile Picture

Modifying the BackColor for the NTextBox

Posted By Volker Kunze 9 Years Ago
Author
Message
Volker Kunze
Question Posted 9 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: Forum Members
Last Active: 9 Years Ago
Posts: 4, Visits: 4
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


Nevron Support
Posted 9 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: 2 hours ago
Posts: 3,054, Visits: 4,009
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.

Best Regards,
Nevron Support Team



Volker Kunze
Posted 9 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: Forum Members
Last Active: 9 Years Ago
Posts: 4, Visits: 4
That was helpful, thank you very much!




Similar Topics


Reading This Topic