126 views
in GUI Development by
Hello,

We have two different builds for our GUI application, one of which uses WebGL. Looking through the generated javascript code, it appears that dimensions of dialogs are hardcoded. Is there a way to have WebGL builds dynamically scale to the window size of of the users browser?

Liam

1 Answer

0 votes
by

Hello Liam,

Unfortunately, I can't provide you a solution to this question. Changing the size of the window would require to resize (recreate) the Canvas element and adjust the size of the Application root object. The actual WebGL Platform Package is not prepared for such operation, so it is not possible to change the dimension of the GUI application when running it within a browser. We will add this request to the TO DO list.

Nevertheless, even if such size adjustment would work, each  size alternation would require your project to handle it explicitly. Precisely you would need to configure or recalculate the layout of the application as well as the layout of all components used in it, so they fill correctly the actual browser window. If you want the Image and Text views to appear scaled, you would need the corresponding Bitmap and Font resources in multiple, size different versions. Otherwise the Images and Text will become blurry.

Generally, if an application is intended to run on different displays (with different resolution), we recommend to use variants. With this approach you create 'variants' of existing components. In each variant you adapt the layout of the component and if desired, use resources (Bitmaps, Fonts) matching the resolution. This aspect is explained in the chapter Managing Variants.

Concerning the dimension of dialogs, it is in not hardcoded. The dimension are fixed because the corresponding components are so defined in your project. If desired, you can change the size of a component at the runtime. In this manner one and the same dialog may appear small or large depending on the actual situation. This could be, for example, a message box which adapts its own size the content of the message it should display. See also the property Bounds.

Best regards

Paul Banach

by
Hi Paul,

 

I was afraid this might be the case. I hope to see some solution in a future version, though I have considered doing such a thing with variants as you suggested.

 

Thank you for your answer,

Liam

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...