Skip to main content

Dynamic dialog window

Hi Brian,
I want create a New Dialog Box. But it will be populated the controls during the execution of the routine. The no.of controls will be depends on the based on the data.
Is it posible to create a dynamic UI from script.
Thanks In Advance
Jiyaji

Brian Element Fri, 06/22/2018 - 09:19

Hi Jiyaji,

Unfortunately that is no easy way to do this.  I could see a way of doing it but that would mean a script creating a new script each time and adding the code.

If there is a maximum number of controls that would appear you could create the maximum and then there is an option to hide them or grey them out, then based on the data you would enable only the controls you need.  Would something like that work for you?

Brian

Jiyajijp Mon, 06/25/2018 - 09:40

Hi Brain,
We won't get the maximum no. of controls. At the time of execution we will get the no. of controls.
Do we need to create  the UI before execution?

Brian Element Mon, 06/25/2018 - 12:52

In reply to by Jiyajijp

Hi Jiyajijp,

Yes you would need to create it ahead of execution unless you want to create a fairly complex script that actually writes a new script that creates the UI that you need.

Brian

Jiyajijp Tue, 06/26/2018 - 03:44

Hi Brain,
So do we get the values in one script to other script, while we running a script from other script.
Thanks
Jiyaji

Brian Element Tue, 06/26/2018 - 08:20

In reply to by Jiyajijp

Hi Jiyajijp,

My prefered way is what osaajah is suggesting, the problem with this is you need to make sure you have the maximum number of items available in your dialog.  The other way of having a script create a script can be quite complicated.

Brian

osaajah Tue, 06/26/2018 - 07:08

Hi jiyajip, you should consider use DlgVisible statement and place controls overlapping one another, and inside your script you determine the controls visibility. For example, when you click button A it will show combo box + eddit box and hide other controls. Then when you click button B it will hide combo box + edit box and show list box + button C and hide other controls. It should be provide visual effects as if you have dynamic dialog.
Firdaus Sentosa

Brian Element Wed, 07/25/2018 - 09:32

In reply to by osaajah

Hi osaajah,

That looks like a nice little app.  The intro screen you have in the video, are you doing that with IDEAScript?  If so how do you get the different colour and font changes or are you just displaying an image in a dialog window?

Brian

The website encountered an unexpected error. Try again later.