Jump to content

GOM scripting - User dialog - Button


Recommended Posts

Hello GOM users,

I was wondering if somebody could help me with understanding of user dialog input features?

I know how to operate with the value which is called from User Dialog.


below attached is a way how i am using the user input from the User dialog


I was wondering if somebody could help me with Button set-up?

The idea is, that operator will select Dome or Panel button (it is Toggle Button Type) and i would like to work with this feature. I would like to make a decision IF Dome is selected, certain TXT file is loaded, else it would read a different file.


I tried to print the button value (i assume YES/NO or 1 or 0) but it did not work


thank you for any help!







Link to comment
Share on other sites

Hey Dusan,

Activities inside the dialog will be noticed inside the dialog event handler.

Whenever an action is run inside the dialog the 'widget' represents this action (eg the user is clicking the button).

If you then analyse the widget (eg is the widget name equal to the button name) you can take further steps.

def dialog_event_handler (widget):
		if widget.name==DIALOG.button.name:
			print (DIALOG.button.value)

Hope this helps!

Gruß, Jens

Link to comment
Share on other sites


  • Create New...