B4J Question Using Hex Color values with CSSUtils SetStyleProperty

Discussion in 'B4J Questions' started by GuyBooth, May 23, 2019.

Similar threads

B4J Library [class] CSS Utils
B4J Code Snippet Colorpicker hide text
B4J Code Snippet Set all buttons CSS style to transparent
B4J Code Snippet Tableview header wrap text
B4J Question css question
  1. GuyBooth

    GuyBooth Active Member Licensed User

    How do I use hex color values with CSSUtils?

    I want to call
    Code:
    Dim COLOR_TEXT_UNSELECTED as ?? = 0xFF112233

    CSSUtils.SetStyleProperty (tglBtn, 
    "-fx-text-fill", COLOR_TEXT_UNSELECTED)
    but have yet to find the magic types or conversions to make it work.

    I know that this works:
    Code:
    CSSUtils.SetStyleProperty(tglBtn, "-fx-text-fill""blue")
    Any insight would be appreciated...
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Code:
    Dim clr As Paint = fx.Colors.From32Bit(0xff00ff00)
    CSSUtils.SetStyleProperty(.., ,, CSSUtils.ColorToHex(clr))
     
    GuyBooth likes this.
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