Open Zeziroth opened 7 years ago
I solved this issue
(((sender as Control).Parent) as MaterialSkin.Controls.MaterialSingleLineTextField).Text=""
(((sender as Control).Parent) as MaterialSkin.Controls.MaterialSingleLineTextField).ForeColor=Color.DrakGray
Hello, today i found a curious "bug", i think.
I wanted to make some Placeholders in my Textfields, so i crashed into my first Problem. Changing the ForeColor in the FormDesigner will NOT affect the Runtime appereance of the Textfield.
Then i thought, huhm... okay lets set the ForeColor at the Formstart... Did that -> But nothing happened....
After that i written the Placeholder Code first: [code] Private Sub MaterialSingleLineTextField2_LostFocus(sender As Object, e As EventArgs) Handles MaterialSingleLineTextField2.LostFocus If sender.text = "" Then sender.text = "XXX" sender.ForeColor = Color.DarkGray End If End Sub [/code] Nothing special ^^ So THAT will affect the REAL Textfield ForeColor...
The Reference of sender is not the same as the Reference of MaterialSingleLineTextField2, wtf? ^^
Need help, i want to change the visible ForeColor at Startup, and not after they Focused/Unfocused it :/