// define the widgets as a list of property/value pairs // note that a list containing just a number reserves a space equal to that number of widgets AvgHead = list ('text', "Averaging", 'Horizontalalignment', 'center', 'Backgroundcolor', White); LinAvgLabel = list ('text', "Linear Avg", 'Horizontalalignment', 'right'); LinAvgValue = list ('edit', string (LinAvg), 'tag', "LinAvgValue", 'Backgroundcolor', White); OverlapLabel = list ('text', "Overlap", 'Horizontalalignment', 'right'); OverlapValue = list ('edit', string (Overlap), 'tag', "OverlapValue", 'Backgroundcolor', White); OverlapUnits = list ('text', "%", 'Horizontalalignment', 'left'); ExpAvgLabel = list ('text', "Exp Avg", 'Horizontalalignment', 'right'); ExpAvgValue = list ('edit', string (ExpAvg), 'tag', "ExpAvgValue", 'Backgroundcolor', White); ... SimTypeLabel = list ('text', "Sim Method", 'Horizontalalignment', 'right'); Sim1Button = list ('radiobutton', "None", 'tag', "Sim1Button",... 'callback', "ChangeSim(1)", 'Horizontalalignment', 'left'); Sim2Button = list ('radiobutton', "Cont", 'tag', "Sim2Button",... 'callback', "ChangeSim(2)", 'Horizontalalignment', 'left'); Sim3Button = list ('radiobutton', "Discr", 'tag', "Sim3Button",... 'callback', "ChangeSim(3)", 'Horizontalalignment', 'left'); Sim4Button = list ('radiobutton', "FFT", 'tag', "Sim4Button",... 'callback', "ChangeSim(4)", 'Horizontalalignment', 'left'); ... ButtonEx = list ('pushbutton', "Exit", 'tag', "ExitButton",... 'callback', "ChangeState(EXIT)", 'Backgroundcolor', Blue); // set up GUI as a page consisting of a list of lines (initially empty) Page = list (); // fill in each line of the GUI as a list of widgets or N-widget-wide blank spaces // these will be placed on a line of the GUI spaced evenly horizontally // some blank lines are needed at the top to ensure the first GUI line can be seen in SciLab 5.1 // do this by inserting 5 lines of: Page($+1) = list (1); Page($+1) = list (AvgHead); Page($+1) = list (LinAvgLabel, LinAvgValue, list (1), OverlapLabel, OverlapValue, OverlapUnits); Page($+1) = list (ExpAvgLabel, ExpAvgValue, list (1), DofLabel, DofValue, list (1)); Page($+1) = list (1); ... Page($+1) = list (ButtonLo, ButtonHi, ButtonAb, list (1), ButtonAp, ButtonEx); ... // display the GUI, using the page details, the GUI properties and the default widget properties GuiHandles = guimaker (Page, list (Title, Width, Height, Space, LightBlue),... list ('Backgroundcolor', LightBlue));