Profile Picture

Modifying the BackColor for the NTextBox

Posted By Volker Kunze 6 Years Ago
Author
Message
Volker Kunze
Question Posted 6 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: 6 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 6 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,090 reputation)Supreme Being (4,090 reputation)Supreme Being (4,090 reputation)Supreme Being (4,090 reputation)Supreme Being (4,090 reputation)Supreme Being (4,090 reputation)Supreme Being (4,090 reputation)Supreme Being (4,090 reputation)Supreme Being (4,090 reputation)

Group: Forum Members
Last Active: 10 hours ago
Posts: 2,962, Visits: 3,363
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 6 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: 6 Years Ago
Posts: 4, Visits: 4
That was helpful, thank you very much!




Similar Topics


Reading This Topic