Syntax |
DlgVisible {ControlName$ | ControlIndex} [,isOn] |
Description |
Hides or shows the specified control. |
Comments |
Hidden controls cannot be seen in the dialog box and cannot receive the focus using Tab. The isOn parameter is an Integer specifying the new state of the control. It can be any of the following values: 1 The control is shown. 0 The control is hidden. Omitted Toggles the visibility of the control. Option buttons can be manipulated individually (by specifying an individual option button) or as a group (by specifying the name of the option group). |
|
The ControlName$ parameter contains the name of the .Identifier parameter associated with a control in the dialog box template. A case-insensitive comparison is used to locate the specific control within the template. Alternatively, by specifying the ControlIndex parameter, a control can be referred to using its index in the dialog box template (0 is the first control in the template, 1 is the second, and so on). |
|
Picture Caching When the dialog box is first created and before it is shown, the Basic Control Engine calls the dialog function with action set to 1. At this time, no pictures have been loaded into the picture controls contained in the dialog box template. After control returns from the dialog function and before the dialog box is shown, the Basic Control Engine will load the pictures of all visible picture controls. Thus, it is possible for the dialog function to hide certain picture controls, which prevents the associated pictures from being loaded and causes the dialog box to load faster. When a picture control is made visible for the first time, the associated picture will then be loaded. |
Example |
This example creates a dialog box with two panels. The DlgVisible statement is used to show or hide the controls of the different panels. Sub EnableGroup(start%,finish%) For i = 6 To
13 'Disable
all options. Function DlgProc(ControlName$,Action%,SuppValue%) If Action% = 1 Then Sub Main() Begin Dialog OptionsTemplate
33,33,171,134,"Options",.DlgProc
'Save options (controls
6-8)
'Editing options
(controls 9-13)
Dim OptionsDialog As
OptionsTemplate |
See Also |
DlgControlId (function); DlgEnable (function); DlgEnable (statement); DlgFocus (function); DlgFocus (statement); DlgListBoxArray (function); DlgListBoxArray (statement); DlgSetPicture (statement); DlgText (statement); DlgText$ (function); DlgValue (statement); DlgValue (function); DlgVisible (statement). |
D |