File selectorI am trying to create a small menu that allows you to choose open data tables. Once you highlight the files you want and press a "Add files" button it will expand the existing window in another box showing the file name and two other text boxes in which the user can type stuff into.
How can this be achieved?
ScriptingRe: File selector You can get list of open datatables with << get data table list(), and you can combine that with << Get name to get names of those. List Box allows you to create selector for those based on the name list.
Names Default To Here(1);
Open("$SAMPLE_DATA/Big Class.jmp");
Open("$SAMPLE_DATA/Cars.jmp");
Get Data Table List() << get name;
For the "expand existing window" you can use << append with text edit boxes to allow user to type into or maybe Table Box with String Col Edit Box.
Re: File selectorI’ve got something now but im finding it difficult to select multiple files and create another box for each one instead of creating only one box for > 1 chosen file.Re: File selectorGet list of the items from List Box and then loop over them while adding new boxes (or use table box). I cannot really give better advice as I have no real idea what I'm helping with.
Names Default To Here(1);
nw = New Window("Example",
H List Box(
V List Box(
a = List Box({"single", "double", "triple"}),
b = Button Box("Add Selections",
selections = a << Get Selected;
scb << Add Element(selections);
sceb1 << Add Element(Repeat({""}, N Items(selections)));
sceb2 << Add Element(Repeat({""}, N Items(selections)));
)
),
tb = Table Box(
scb = String Col Box("Option", {}),
sceb1 = String Col Edit Box("Edit1", {}),
sceb2 = String Col Edit Box("Edit2", {})
)
)
);
Re: File selectorThat's no problem, thank you so much for your help!