Gambas-it

Gambas dal mondo esterno => Germania => Topic aperto da: vuott - 07 Febbraio 2022, 13:40:25

Titolo: Cambiare colore di una TextBox
Inserito da: vuott - 07 Febbraio 2022, 13:40:25
https://www.gambas-club.de/viewtopic.php?f=3&t=5805
Titolo: Re:Cambiare colore di una TextBox
Inserito da: Gianluigi - 07 Febbraio 2022, 14:35:40
Rimanderei a questa discussione
https://www.gambas-it.org/smf/index.php?topic=9057.msg51471#msg51471
 e piĆ¹ precisamente
https://lists.gambas-basic.org/pipermail/user/2022-February/075323.html

Comunque io direi:
Codice: [Seleziona]
Public Sub Form_Open()

  Dim hControl As Control = Me["TextBox1"]

  hControl.Enabled = False
  If Not hControl.Enabled Then
    hControl.Foreground = Color.LightForeground
  Else
    hControl.Foreground = Color.TextForeground
  Endif
  hControl.Background = Color.TextBackground
  TextBox1.text = "PIPPO"

End