question

Steven Chen avatar image
0 Likes"
Steven Chen asked Phil BoBo edited

GUI Image Auto Fit

Hello,

How to make image on GUI automatically resize to fit in the control such as static text?

FlexSim 22.0.1
guiimages
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

·
Phil BoBo avatar image
2 Likes"
Phil BoBo answered Phil BoBo edited

A Static Text's image is a fixed size.

You could use an html control to draw an image that automatically resizes.

<img src="flexsimmodel/logo.png" width="100%" height="100%">

If you want to use it on a dashboard, you can use the GUI Class object to link to it. If you do that, you may want to put it in a panel so that you can click the panel to move and resize it. Otherwise, only the very outer pixel of the control will be clickable in the dashboard.

scale_image.fsm

scale-image.gif

See also:

Additional View Attributes Reference (flexsim.com)

Web Pages (flexsim.com)


scale-image.gif (428.5 KiB)
scale-image.fsm (34.9 KiB)
5 |100000

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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