View Single Post
  #1  
Old 06-22-2016, 11:07 AM
Eugene Eugene is offline
Member
 
Join Date: Jun 2016
Posts: 6
Change the color of button

I've created a few panels with different buttons. One of them shown below. I would like to change the button color when selected for specific panel to another color. May I know how could I do it?

For example, I would like PrimeOffButton.set(1) to be red instead of default color.

PrimeOffButton = viz.addButtonLabel('Off')
PrimeOffButton.set(1)
PrimeKeepAliveButton = viz.addButtonLabel('Keep-Alive')
PrimeKeepAliveButton.set(0)
PrimeOperationalButton = viz.addButtonLabel('Operational')
PrimeOperationalButton.set(0)
subpanel2.addItem(viz.addText('SSRMS Prime String'))
subpanel2.addItem(PrimeOffButton)
subpanel2.addItem(PrimeKeepAliveButton)
subpanel2.addItem(PrimeOperationalButton)

Thanks.
Reply With Quote