Tab Controls

Description

Alpha Anywhere allows you to create tabbed dialogs. Tabbed dialogs allow you to organize your dialog into logical sections, and to pack a lot more information onto the dialog than a single dialog would allow. To put a tab control on a dialog you use the {tab}, {pane} and {endtab} commands. The syntax for the commands is as follows:

{tab=variable_name}
{pane=Pane1 Description}

Xdialog code for first page of tab control

{pane=Pane2 Description}

Xdialog code for second page of tab control

{pane=Pane'n' Description}

Xdialog code for 'N'th page of tab control

{endtab}

Variable_name is a variable that is set to the name of the current tab. You can also control which tab has initial focus by setting the value of variable_name before the dialog is open. The following script displays a dialog with a tab control:

dim a_card_type[100] as C
x = "American Express,Visa,Master Card,Discover"
a_card_type.initializex,",",crlf(?)
dim a_expire_month[12] as C
x = "01,02,03,04,05,06,07,08,09,10,11,12"
a_expire_month.initializex,",",crlf(?)
dim a_expire_year[10] as C
x = "2000,2001,2002,2003,2004,2005,2006,2007,2008,2009"
a_expire_year.initializex,",",crlf(?)
page = "Billing"
result = ui_dlg_box("Title",<<%dlg%
{tab=page}
{pane=Billing}
{region}
First name:| [.32firstname] ;
Last name:| [.32lastname] ;
Address 1:| [.32address1] ;
Address 2:| [.32address2] ;
City:| [.32City] ;
State:| [State] ;
Zip:| [Zip]
{endregion};
{pane=Shipping}
{region}
First name:| [.32firstname] ;
Last name:| [.32lastname] ;
Address 1:| [.32address1] ;
Address 2:| [.32address2] ;
City:| [.32City] ;
State:| [State] ;
Zip:| [Zip]
{endregion};
{pane=Credit Card}
{region}
Card Type:| [.32card_type^=a_card_type] ;
Card Number:| [.32card_number] ;
Expiration:| [.4expiry_month^=a_expire_month] [.5expiry_year^=a_expire_year] ;
{endregion};
{endtab}|
{Region3}
 <10&OK>;
 <10&Cancel>
{Endregion3}
%dlg%)

This would produce the following dialog:

Tab Control:

Limitations

Desktop applications only

See Also