Tab Sheet - CloseClickQuery Event

Set to False to stop the tab closing on click

Member of Tab Sheet (PRIM_TBSH)

Parameters

NameTypeData TypeDescription
Continue*BothBooleanContinue parameter is used to confirm closing of the page

Details

The CloseClickQuery event is fired when the Close button on the tab sheet is clicked.
 
Setting the Continue parameter to False will stop the tab sheet being closed.
 
The Close button is displayed when the DockCloseButton property is True.

Example

In this example, Page2 can only be closed if the Close check box is checked.
Begin_Com Role(*EXTENDS #PRIM_FORM) Clientheight(268) Clientwidth(592) Height(307) Left(188) Top(205) Width(608) Layoutmanager(#TableLayout1)
 
   Define_Com Class(#PRIM_TBLO) Name(#TableLayout1)
   Define_Com Class(#PRIM_TBLO.Column) Name(#Column1) Displayposition(1) Parent(#TableLayout1)
   Define_Com Class(#PRIM_TBLO.Row) Name(#Row1) Displayposition(1) Parent(#TableLayout1)
   Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutItem1) Column(#Column1) Manage(#Tab1) Parent(#TableLayout1) Row(#Row1)
 
   Define_Com Class(#PRIM_TAB) Name(#Tab1) Bottomlayoutpriority(4) Componentversion(2) Displayposition(1) Height(454) Left(0) Leftlayoutpriority(1) Parent(#COM_OWNER) Rightlayoutpriority(2) Tabposition(1) Top(0) Toplayoutpriority(3) Width(912) Closeposition(TabHeader)
   Define_Com Class(#PRIM_TBSH) Name(#Sheet1) Caption('&Page1') Displayposition(1) Height(430) Left(0) Parent(#Tab1) Tabposition(1) Tabstop(False) Top(24) Width(912) Dockclosebutton(True)
   Define_Com Class(#PRIM_TBSH) Name(#Sheet2) Caption('Pa&ge2') Displayposition(2) Height(430) Left(0) Parent(#Tab1) Tabposition(2) Tabstop(False) Top(24) Width(912) Dockclosebutton(True)
   Define_Com Class(#PRIM_CKBX) Name(#Close) Displayposition(1) Left(16) Marginleft(2) Parent(#Sheet2) Tabposition(1) Top(7) Width(185) Caption('Close')
 
   Evtroutine Handling(#Sheet2.CloseClickQuery) Continue(#Continue)
 
      #Continue := (#Close.buttonState = checked)
 
   Endroutine
 
End_Com

See also

All Component Classes

Technical Reference

Febuary 18 V14SP2