User Function Reference    
selectdlg3

Generate a tabbed, scrolled selection dialog.

Syntax

Choice = selectdlg3(Itemlist)
Choice = selectdlg3(Itemlist, Title)
Choice = selectdlg3(Itemlist, Title, Mode)
Choice = selectdlg3(Itemlist, Title, Mode, Default)

Description

selectdlg3 displays arrays of radio buttons in a resizable figure window with tabbed panels. The calling process is stopped to await the user selection. The choice(s) selected by the user is/are returned as Choice, a c-by-3 index (row, col, tab) into the Itemlist cell array. [] is returned if no selection is made, or the dialog is cancelled or closed.

Choice = selectdlg3(Itemlist) Itemlist is a cell vector (length nt+1) containing:
    a string cell matrix of nt rows {tab_labels;tab_titles} (tab_titles optional)
    nt choice cell vectors - each containing:
        a string cell vector of row titles (optional)
        a string cell vector of column titles (optional)
        a string cell array of m-by-n choice item names
        or just an array of m-by-n choice item names.

Choice = selectdlg3(Itemlist, Title) Title is a title string displayed in the window title bar.

Choice = selectdlg3(Itemlist, Title, Mode) Mode is selection mode - 0 for mutiple (default) or 1 for single -
    if scalar, it applies to whole (Mode=1 allows only a single button)
    if vector, it must have length of 3 : [row_mode, col_mode, tab_mode]
        row_mode=1 means only 1 row in any given col allowed
        row_mode=1 means only 1 col in any given row allowed
        but if both row & col, only 1 button on the tab allowed
        tab_mode=1 means only the tab in view returns its settings
        e.g. Mode=[1,0,1] : only 1 button per col, from only current tab.

Choice = selectdlg3(Itemlist, Title, Mode, Default) Default is a d-by-3 index matrix to the buttons initially selected. Index values outside the array of choices are ignored.

Examples

Example 1. Make a simple selection.

%Create a simple selection with 2 tabs
tabs={'Car/Tyre';'Day'};
tits={'Select car/tyre combination';'Condition for each day'};
cars={'Porsche';'Mercedes';'Audi';'BMW';'VW'};
tyres={'Michelin','Firestone','Continental','Dunlop'};
numb={'First';'Second';'Third'};
humid={'Wet','Medium','Dry'};
choice1={cars,tyres,cell(5,4)};
choice2={numb,humid,cell(3,3)};
def=[[[1:5]',ones(5,2)];[[1:3]',ones(3,2)*2]];
sel = selectdlg3({[tabs,tits],choice1,choice2},'Race Selection',[0,1,0],def);
type=[cars(sel([1:5],1)),tyres(sel([1:5],2))'] 
day=[numb(sel([6:8],1)),humid(sel([6:8],2))']

See Also

menu, selectdlg, selectdlg2, listdlg, listdlg2, tabdlg


  selectdlg2 listdlg2