question

K_yun avatar image
0 Likes"
K_yun asked K_yun commented

Is there a way to build GUI for flowitems?

FlexSim 21.2.2
flowitemguicustom gui
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

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered K_yun commented

Yes - just set the guifocusclass of the item in the flowitembin to point to the location of your customGUI. Then when you try to interact with the item by double clicking, your custom GUI should open with the viewfocus and objectfocus being set to the item - which you can then refence on any views/links.

Example attached.

exampleFlowitemGUI.fsm


· 5
5 |100000

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

K_yun avatar image K_yun commented ·

Thank you for support. In this model, i have to double click the flowitem to open the GUI you've designed, and must click the close button on the GUI to close it. I am wondering how to open the gui by leftmouth button down, and close it by clicking anyplace in the model?

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ K_yun commented ·

You can add this behaviour to the flowitem's tree:

1646231628128.png

(really you only need the OnClick node somewhere in its attributes tree).

Then in the GUI you should be able to detect OnKillFocus.

0 Likes 0 ·
1646231628128.png (4.4 KiB)
K_yun avatar image K_yun Jason Lightfoot ♦♦ commented ·

001.png002.png

exampleflowitemgui.fsm

I modified the model, but can not find the OnKillFocus attribute.

0 Likes 0 ·
001.png (3.9 MiB)
002.png (1.2 MiB)
Show more comments