User Tools

Site Tools

Navigation:  Language Reference > 8 - Controls > Control Declarations >====== SHEET (declare a group of TAB controls) ====== Previous pageReturn to chapter overviewNext page



[,UP ] [,DOWN ] [,| LEFT (<;width>)| ] [,IMM ]
| RIGHT (<;width>)|
| ABOVE (<;width>)|
| BELOW (<;width>)|


SHEET Declares a group of TAB controls.
AT Specifies the initial size and location of the control (PROP:AT). If omitted, default values are selected by the runtime library.
CURSOR Specifies a mouse cursor to display when the mouse is positioned over the control (PROP:CURSOR). If omitted, the WINDOW's CURSOR attribute is used, else the Windows default cursor is used.
USE The label of a variable to receive the current TAB choice (PROP:USE). If this is a string variable, it receives the value of the TAB string (with any ampersands stripped out) selected by the user. If a numeric variable, it receives the number of the TAB selected by the user (the value returned by the CHOICE() procedure).
LAYOUT Specifies the control's left-to-right or right-to-left display orientation (PROP:LAYOUT)
DISABLE Specifies the control appears dimmed when the WINDOW or APPLICATION opens (PROP:DISABLE).
KEY Specifies an integer constant or keycode equate that immediately gives focus to the currently selected TAB in the SHEET control (PROP:KEY).
FULL Specifies the control expands to occupy the entire size of the WINDOW for any missing AT attribute width or height parameter (PROP:FULL).
SCROLL Specifies the control scrolls with the window (PROP:SCROLL).
HIDE Specifies the control does not appear when the WINDOW or APPLICATION is first opened (PROP:HIDE). UNHIDE must be used to display it.
FONT Specifies the display font for the control and the default for all the controls in the SHEET (PROP:FONT).
DROPID Specifies the control may serve as a drop target for drag-and-drop actions (PROP:DROPID).
WIZARD Specifies the SHEET's TAB controls do not appear (PROP:WIZARD). The user moves from TAB to TAB under program control.
SPREAD Specifies the TABs are evenly spaced on one line (PROP:SPREAD).
HSCROLL Specifies the TABs display all on one row instead of multiple rows, no matter how many TABs there are (PROP:HSCROLL). Right and left (or up and down) scroll buttons appear at either end of the TABs to scroll through the TABs.
JOIN Specifies the TABs display all on one row instead of multiple rows, no matter how many TABs there are (PROP:JOIN). Right and left (or up and down) scroll buttons appear together at the right (or bottom) end of the TABs to scroll through the TABs.
NOSHEET Specifies the TABs display without a visible sheet (PROP:NOSHEET).
COLOR Specifies a background color for the control (PROP:COLOR).
UP Specifies the TAB text is vertical reading upwards (PROP:UP).
DOWN Specifies the TAB text is vertical reading downwards (PROP:DOWN).
LEFT Specifies the TABs appear to the left of the sheet (PROP:LEFT).
RIGHT Specifies the TABs appear to the right of the sheet (PROP:RIGHT).
ABOVE Specifies the TABs appear above the sheet (PROP:ABOVE). This is the default position.
BELOW Specifies the TABs appear below the sheet (PROP:BELOW).
IMM Specifies EVENT:NewSelection generates whenever the user clicks on a TAB (PROP:IMM).
tabs Multiple TAB control declarations.

The SHEET control declares a group of TAB controls that offer the user multiple “pages” of controls for the window (not valid in a REPORT). The TAB controls in the SHEET structure define the “pages” displayed.

Input focus changes between the SHEET's TAB controls are signalled only to the SHEET control affected. This means the events generated when the user changes input focus within a SHEET structure are field-specific events for the affected SHEET structure, not the individual TAB control.

A string variable as the SHEET structure's USE attribute receives the text of the TAB control selected by the user, and the CHOICE(?Option) procedure returns the number of the selected TAB control. If the SHEET structure's USE attribute is a numeric variable, it receives the number of the TAB control selected by the user (the same value returned by the CHOICE procedure).

You can use the SELECT statement to force navigation to a specific tab by specifying the TAB control's position number within the sheet as the second parameter: SELECT(?Sheet,TabNumber).

Events Generated:

EVENT:TabChanging Focus is about to pass to another tab.
EVENT:NewSelection Focus has passed to another tab, or the user clicked on a TAB in a non-WIZARD SHEET with the IMM attribute.
EVENT:Drop A successful drag-and-drop to the control.

If the SHEET control has a WIZARD attribute, EVENT:NewSelection is not posted on any tab changed by the setting of the PROP:ChoiceFeq property. This is by design, because tab changing behavior for wizard-like SHEETs is under full program control. The EVENT:NewSelection is a notification to the program that a new TAB (for SHEETs) is activated. If a SHEET has the WIZARD attribute, tabs can be changed only by the program (not as result of mouse clicks, hotkey pressing and other events handled by the RTL). Therefore, the program always knows whenthe active TAB has been changed.

If a SHEET control DOES NOT have a WIZARD attribute, the setting of PROP:ChoiceFeq will allow the posting of EVENT:NewSelection.

The LEFT/RIGHT/ABOVE/BELOW attributes of a SHEET control can have a width parameter, which specifies the width of the TAB.


MDIChild WINDOW('Child One'),AT(0,0,320,200),MDI,MAX,HVSCROLL


          TAB('Tab One'),USE(?TabOne)

           OPTION('Option 1'),USE(OptVar1),KEY(F10Key),HLP('Option1Help')

            RADIO('Radio 1'),AT(20,0,20,20),USE(?R1)

            RADIO('Radio 2'),AT(40,0,20,20),USE(?R2)


           OPTION('Option 2'),USE(OptVar2),MSG('Option 2')

            RADIO('Radio 3'),AT(60,0,20,20),USE(?R3)

            RADIO('Radio 4'),AT(80,0,20,20),USE(?R4)


           PROMPT('Enter Data:'),AT(100,100,20,20),USE(?P1)


           PROMPT('Enter More Data:'),AT(100,200,20,20),USE(?P2)



          TAB('Tab Two'),USE(?TabTwo)

           OPTION('Option 3'),USE(OptVar3)

            RADIO('Radio 1'),AT(20,0,20,20),USE(?R5)

            RADIO('Radio 2'),AT(40,0,20,20),USE(?R6)


           PROMPT('Enter Data:'),AT(100,100,20,20),USE(?P3)


           PROMPT('Enter More Data:'),AT(100,200,20,20),USE(?P4)







See Also:


Extended UI


sheet_declare_a_group_of_tab_controls_.htm.txt · Last modified: 2021/04/15 15:57 by