question

Borja Lorenzo avatar image
0 Likes"
Borja Lorenzo asked Borja Lorenzo commented

onChange in a GUI

Hello,
I am programming a GUI and I wanted to add an onChange attribute to the current item to trigger an event. Does this attribute exist in GUIs? The objects I am using in the GUI are comboboxes. Thank you in advance for your comments

FlexSim 24.1.1
guicomboboxatributeitemcurrentonchange
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Logan Gold avatar image
1 Like"
Logan Gold answered Borja Lorenzo commented

Hey @Borja Lorenzo, for Comboboxes, you have access to the OnSelect attribute that fires when an option is selected in the combobox. This is the closest thing I can think of for what you're describing. You can use the itemcurrent attribute to figure out which option was selected, and then have code to do whatever you want to do based on which item was selected.

Would you be able to do what you're hoping to do with OnSelect? If not, let us know what you're trying to do, and we'll see what else might be possible.

· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Borja Lorenzo avatar image Borja Lorenzo commented ·

Hi, Logan
Thanks for your suggestion. I ended up doing something like what you mentioned and complemented it with the use of a User Command. I think it worked. But I thought there would be an onChange event trigger… just like there is an onSelect.

0 Likes 0 ·