Acknowledge button for touchscreen

I want to use the Alarm status Table object in a touchscreen project however the acknowledge button is far too small. I am having difficulty getting a script on a separate larger button for this purpose to work. I have looked at the system.alarm.acknowledge method but am having difficulty getting the selected alarm EventId to pass to the button script. Can you help please . I am using version 7.6

Thanks

Alan

Try this to change the size of the button.

[code]from java.awt import Dimension

alarmStatus = event.source.parent.getComponent(‘Alarm Status Table’)
ackButton = alarmStatus.getComponents()[0].getComponents()[1].getComponents()[0].getComponents()[0]

dim = Dimension(200,50)
ackButton.setSize(dim)
ackButton.setPreferredSize(dim)[/code]

1 Like

Figured this out for myself eventually.

Created new button and hid button on the Alarm Status Table. Set Alarm Status Table to only allow one row selection.

Script on button

results = even.source.parent.getComponent(‘Alarm Status Table’).selectedAlarms
uuid = [str(results.getValueAt(0,‘EventId’))]
system.alarm.acknowledge(uuid, “none”)

enabled binding on the button
if ({Root Container.Alarms.Low_Pri_Alarms.Alarm Status Table.selectedAlarms) = none,0,1) to prevent erro when button pushed when no alarm is selected

Did you try what jpark suggested?