Question
How do I add a drop-down list to a dialog box?
I want to add a drop down list to this dialog box (script already available on this forum).
The drop down list content should contain say:
A
B
C
If user selects A, clicking on the Execute button displays message corresponding to A and same for others.
LaunchPalette();
function LaunchPalette()
{
var resource =
"""palette {
properties:{ closeButton:true, maximizeButton:false,
minimizeButton:false, resizeable:true },
orientation:'row', spacing:15, margins:10,
helloButton: Button {
text:'Say Hello', alignment:['fill','fill'] },
closeButton: Button {
text:'Close', alignment:['fill','fill'] },
}""";
var palette = new Window (resource, "My Palette");
palette.layout.layout(true);
palette.show();
palette.bounds = {x:100, y:100, width:158, height:38};
palette.layout.resize();
palette.helloButton.onClick = function()
{
alert("Hi there! You are using FrameMaker version "
+ app.VersionMajor + "." + app.VersionMinor + "." + app.VersionRevision
+ ".\n\nYour username/login is \"" + app.UserLogin + "\"."
+ "\n\nThe product is installed at the following location:\n\n "
+ app.HomeDir
+ "\n\nHave a nice day!");
};
palette.closeButton.onClick = function()
{
palette.close();
palette = null;
};
palette.onClose = function()
{
palette = null;
};
palette.onResize = function()
{
palette.layout.resize();
}
}