This question already has answers here:
Change group box text color?
(5 answers)
Closed 8 years ago.
How I can change the GroupBox title colour?
The default colour is blue and I would like to alter that.
Try using something like the following:
groupBox1.ForeColor = Color.Red;
It should change to the desired color.
In WinForms - change the ForeColor property of the Group Box to the desired color.
Did you try setting the ForeColor property?
Related
This question already has answers here:
Combo box drop down width on suggest
(3 answers)
Closed 2 years ago.
In the WinForms combobox, the width of the drop-down can be set programmatically, as in the following example, code and screenshot:
myComboBox.DropDownWidth = 300;
For the combo box, I have enabled the autocomplete:
myComboBox.AutoCompleteSource = AutoCompleteSource.ListItems;
myComboBox.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
The autocomplete drop-down appears as follows:
How can I set the width of the drop-down containing the suggested items?
I believe that is not possible. You'll probably have to create a custom control to achieve what you need.
Here some information that might be useful for you:
https://social.msdn.microsoft.com/Forums/windows/en-US/f88f37c9-95f9-4f2f-84b5-e262f49a009d/autocomplete-suggest-box-can-this-be-influenced?forum=winformsdesigner
This question already has answers here:
Android ListView Text Color
(8 answers)
Closed 5 years ago.
I am trying to style my ListView so that the Item Text Color is Black.
I have tried to put android:textColor="#000000" and it is still not working.
The background is White which is what I want.
How would I make the ListView Item Text Color Black via XML or Programatically?
Try this code in your custom adapter.
TextView text = new TextView(context);
text.setTextColor(Color.parseColor("any hex value of a color"));
This question already has answers here:
C# WinForms Vertical Alignment for TextBox, etc
(5 answers)
Closed 7 years ago.
I'm trying to align the text in the middle to my textbox control in winforms.I also increased the height of the textbox by setting the multiline property to true. But when editing the text, the text goes to the top-left position. I want it to be in the same position,even on edit mode and normal mode.
I want to achieve it like
Excel-Normal mode and Excel-EditMode.Is this possible? Thanks in advance.
What you're thinking of is a RichTextBox.
I forget if it supports vertical alignment, though I'm sure there is a work around.
This question already has answers here:
How to change the font color of a disabled TextBox?
(9 answers)
How to make text in a WinForms TextBox unselectable without disabling it?
(3 answers)
Closed 10 years ago.
I want to get the same functionality as Textbox.Enabled = false; so that the text in a textbox is not selectable at all but without the text changing to light gray. It should stay the same.
Textbox.ReadOnly = true; still lets you select it so that's not good.
And no it has to be a textbox not a label unfortunately.
Is this in WPF? If so you should use Textbox.Enabled = false; and change the styling so that this disabled textbox looks the way you want it to look.
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Vista/7: How to get glass color?
Since Windows Vista it is possible to customize the System color:
How can I programatically get the currently set system color as ARGB or HEX value?
To get the color of the glass you could have a look at either of these posts:
https://stackoverflow.com/a/5262555/340045
or
Vista/7: How to get glass color?