B4J Code Snippet Set all buttons CSS style to transparent

Discussion in 'B4J Code Snippets' started by rwblinn, Jun 5, 2016.

  1. rwblinn

    rwblinn Well-Known Member Licensed User

    Hi All,

    just a neat little one to set the CSS style of all buttons in one go to transparent using the CSSUtils library.

    'Set all buttons CSS style to transparent
    For Each n As Node In MainForm.RootPane.GetAllViewsRecursive
    If n Is Button Then CSSUtils.SetStyleProperty(n, "-fx-background-color""transparent")
    Erel likes this.
  2. Erel

    Erel Administrator Staff Member Licensed User

    Note that you can also use:
    If n Is Button Then CSSUtils.SetBackgroundColor(n, fx.Colors.Transparent)
    hibrid0 and rwblinn like this.
  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