Dynamic dialog window

12 posts / 0 new
Last post
Jiyajijp
Offline
Joined: 12/08/2016 - 06:34
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's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

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
Offline
Joined: 12/08/2016 - 06:34

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's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

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
Offline
Joined: 12/08/2016 - 06:34

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's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

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
Offline
Joined: 05/25/2018 - 02:33

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

Jiyajijp
Offline
Joined: 12/08/2016 - 06:34

Hi osaajah / Brain,
Is there any sample code is avaliable.
Thanks 

Jiyajijp
Offline
Joined: 12/08/2016 - 06:34

Hi,
I got the solution to use the DlgVisible. 
DlgVisible "Text",False
Thanks for the suggestion.

osaajah
Offline
Joined: 05/25/2018 - 02:33

may be this short video can explain what I mean to get "dynamic window / controls" effect.

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

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

Pages