Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

Quick App - change color on a button?


JcBorgs

Question

Anyone know how to change the color of a button in a QA?

 

Guess it is done with the ”updateView” command, but there are no documentation available on the different options.
 
Did try this but didn’t work…. :-)  that would have been too simple…
self:updateView("btn_Pause","color","blue")
Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0
  • Inquirer
  • No luck, did try several different things but nothing worked. 
     

    This was unfortunate because it would have been really useful to change colors on buttons.

    Link to comment
    Share on other sites

    • 0
    13 hours ago, JcBorgs said:

    No luck, did try several different things but nothing worked. 
     

    This was unfortunate because it would have been really useful to change colors on buttons.

    It's impossible to change background or font color. But you can create a label (below or above the button) and change the font color (html format) - at least that what I do.

    Another idea is to use Unicode characters, but the downside of that is that the symbols are very small.

     

    Link to comment
    Share on other sites

    • 0
    On 7/17/2023 at 1:07 AM, cag014 said:

    It's impossible to change background or font color. But you can create a label (below or above the button) and change the font color (html format) - at least that what I do.

    Another idea is to use Unicode characters, but the downside of that is that the symbols are very small.

     

    Cag014, may you make an exampel on how to use the html code on the label?

    can it be done in with the updateview?

     

     
    self:updateView("info1", "text", "Light On")
     
    Link to comment
    Share on other sites

    • 0
    17 hours ago, Brors94 said:

    Cag014, may you make an exampel on how to use the html code on the label?

    can it be done in with the updateview?

     

     
    self:updateView("info1", "text", "Light On")
     

    for example -

    display "Light On" in red font

    self:updateView("info1", "text", "<font color=red>Light On</font>")

     

    display "Light On" in light blue and red font

    self:updateView("info1", "text", "<font color=cadetblue>Light </font><font color=red>On</font>")

     

    display Unicode character. Unicode character usually too small, so increase the size: 

    self:updateView("info1", "text", "<font size=6>💡</font>") 

     

     link for more Unicodes :  

    Please login or register to see this link.

     

    display lamp ON/OFF using internal saved images of the hub

    Light ON

    self:updateView("info1", "text", "<img src='/assets/icon/fibaro/light/light100.png' >"

    Light OFF

    self:updateView("info1", "text", "<img src='/assets/icon/fibaro/light/light0.png' >"

    • Thanks 1
    Link to comment
    Share on other sites

    • 0
    7 hours ago, cag014 said:

    for example -

    display "Light On" in red font

    self:updateView("info1", "text", "<font color=red>Light On</font>")

     

    display "Light On" in light blue and red font

    self:updateView("info1", "text", "<font color=cadetblue>Light </font><font color=red>On</font>")

     

    display Unicode character. Unicode character usually too small, so increase the size: 

    self:updateView("info1", "text", "<font size=6>💡</font>") 

     

     link for more Unicodes :  

    Please login or register to see this link.

     

    display lamp ON/OFF using internal saved images of the hub

    Light ON

    self:updateView("info1", "text", "<img src='/assets/icon/fibaro/light/light100.png' >"

    Light OFF

    self:updateView("info1", "text", "<img src='/assets/icon/fibaro/light/light0.png' >"

     

     

    Thanks :D Very nice exampel, will definetly use this alot! :D 

     

     

    • Like 1
    Link to comment
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...