View Colors #1667
-
According to the conceptual documentation, Some views support setting individual color attributes, you create an attribute for a particular pair of Foreground/Background like this: var myColor = Application.Driver.MakeAttribute (Color.Blue, Color.Red);
var label = new Label (...);
label.TextColor = myColor However, this text segment did not elaborate any further under which conditions some views support this type of color assignment. For Instance, a label I created in my Views such as Label titleLabel = new(ResourceManager.GetString("LoginTitleLabel")) { X = 1, Y = 1 }; does not have a Of course, perhaps there already exists a way to add colors to specific text labels that I have missed during my research? Far be it from me to rule out this possibility! Anyway, that's my only pet peeve about this library, love everything else about it ❤️ |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
There is no TextColor property anymore. That documentation must be updated. It was superseded by the About the use of escape sequence for the colors, you can take a look how the |
Beta Was this translation helpful? Give feedback.
There is no TextColor property anymore. That documentation must be updated. It was superseded by the
ColorScheme
property. Use it like this on a predefined:label.ColorScheme = Colors.Base.Normal
or create a new
ColorScheme
with theToplevel
,Base
,Menu
,Dialog
orError
.About the use of escape sequence for the colors, you can take a look how the
NetDriver
handles it.