Eugene
08-25-2016, 09:42 AM
I've created a system status panel using buttons and would like to prevent the subject from accidentally clicking on the buttons. Currently, when I click on the 'Normal' button, it becomes unshaded.
May I know how could I disable the ability for someone to click it without causing the button to be gray-out.
import viz
import vizdlg
viz.go()
SystemIndicatorPanel = vizdlg.Panel()
SystemNormalButton = viz.addButtonLabel('NORMAL')
SystemNormalButton.set(1)
SystemErrorButton = viz.addButtonLabel('ERROR')
SystemErrorButton.set(0)
SystemIndicatorText = viz.addText('Overall System State')
SystemIndicatorPanel.addItem(SystemIndicatorText)
SystemIndicatorPanel.addItem(SystemNormalButton)
SystemIndicatorPanel.addItem(SystemErrorButton)
viz.link(viz.CenterTop,SystemIndicatorPanel,offset =(-150,-50,0))
May I know how could I disable the ability for someone to click it without causing the button to be gray-out.
import viz
import vizdlg
viz.go()
SystemIndicatorPanel = vizdlg.Panel()
SystemNormalButton = viz.addButtonLabel('NORMAL')
SystemNormalButton.set(1)
SystemErrorButton = viz.addButtonLabel('ERROR')
SystemErrorButton.set(0)
SystemIndicatorText = viz.addText('Overall System State')
SystemIndicatorPanel.addItem(SystemIndicatorText)
SystemIndicatorPanel.addItem(SystemNormalButton)
SystemIndicatorPanel.addItem(SystemErrorButton)
viz.link(viz.CenterTop,SystemIndicatorPanel,offset =(-150,-50,0))