Skip to main content
Known Participant
September 20, 2010
Answered

Dynamic Pages in ScriptUI

  • September 20, 2010
  • 2 replies
  • 889 views

I have a window written in ScriptUI. It consists of a page containing several elements.

I was wondering, whether it's possible to dynamically change elements, i.e. when the user enters a number in one of the edit field, the number of checkboxes on the page change.

Thanks.

This topic has been closed for replies.
Correct answer Peter Kahrel

See Bob Stucky's example here: http://forums.adobe.com/message/2280793#2280793

Peter

2 replies

Peter Kahrel
Community Expert
Peter KahrelCommunity ExpertCorrect answer
Community Expert
September 20, 2010

See Bob Stucky's example here: http://forums.adobe.com/message/2280793#2280793

Peter

BarqxAuthor
Known Participant
September 20, 2010

I got it. Had to add a window.layout.layout() call.

Thanks.

Marc Autret
Legend
September 20, 2010

Yes, you can do that. It's possible to create widgets on-the-fly and/or to handle the visible property of a widget.

BarqxAuthor
Known Participant
September 20, 2010

Marc Autret: How do I do that? I have the function:

function onClick()

{

     Dialog.Page1.myCheckbox = Dialog.Page1.myCheckbox.add('checkbox', undefined, 'myCheckBox');

}

The function is called on clicking a button in the window. However, no checkbox is added.

Marc Autret
Legend
September 20, 2010

You must use:

myWindow.layout.layout(true);

@+

Marc

[EDIT: Oops! Seems I'm too late...]