Android Question how can i change color of Disabled Label ?

Discussion in 'Android Questions' started by Waldemar Lima, May 2, 2019.

  1. Waldemar Lima

    Waldemar Lima Active Member Licensed User

    hello everyone !
    how can i change a color of a disabled object ?
     
  2. mangojack

    mangojack Well-Known Member Licensed User

    Label or object ? ... this works with Label views

    Code:
    Sub Button1_Click
        
    If Label1.Enabled Then
           Label1.Enabled = 
    False
           Label1.Color = 
    Colors.Gray
        
    Else
           Label1.Enabled = 
    True
           Label1.Color = 
    Colors.White
        
    End If  
    End Sub
    obviously you can use Colors.ARGB() to change the Alpha level if needed.
     
  3. Erel

    Erel Administrator Staff Member Licensed User

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice