Setting TextView color #2884
Replies: 3 comments 6 replies
-
I'm still not sure I fully understand the elements of ColorScheme, but I fumbled my way to a solution. $cs = [Terminal.Gui.ColorScheme]::New()
$cs.Normal = [Terminal.Gui.Attribute]::New([Terminal.Gui.Color]::BrightBlue,[Terminal.Gui.Color]::Gray)
$cs.Focus = [Terminal.Gui.Attribute]::New([Terminal.Gui.Color]::White,[Terminal.Gui.Color]::DarkGray)
$subWin = [Terminal.Gui.Window]@{
Title = 'Add Category'
X = [Terminal.Gui.Pos]::Center()
Y = [Terminal.Gui.Pos]::Center()
Width = 50
Height = 10
ColorScheme =$cs
} And I don't set a color scheme on the text view controls. |
Beta Was this translation helpful? Give feedback.
-
You need to set all attributes of the ColorScheme, not just In v2 you can use Why are you not just using |
Beta Was this translation helpful? Give feedback.
-
One reason is Dialog already has a distinct color scheme. Other reasons:
|
Beta Was this translation helpful? Give feedback.
-
I think I need some assistance in understanding how color schemes work. I have a secondary form to display in my app.
I've figured out how to change the form color so that it stands out from the main form.
However, I can't figure out how to format the TextView in the pop-up form to have a white/gray background and black text. For that matter, I'd like to get the check box control to not be contrasted with the popup background.
If I create the popup without defining its color scheme, the controls are rendered the way I want, but then the popup background color is not what I want.
I am having trouble connecting the conceptual dots.
Beta Was this translation helpful? Give feedback.
All reactions