Enabling a window or control¶
enable, enable_tabstop |
Enable a window or control |
SYNTAX
enable | enable_tabstop object_id [, object_id]…
Enable the object or objects specified..
The enable command alters the appearance of a previously disabled object. Disabled objects, unless disabled by the disable_tabstop command or the WS_NOTABSTOP style flag, are displayed in faint text. The enable command brings such an object into normal focus,
The enable_tabstop command has no effect on the appearance of an object. The effect of this command is identical to that of removing the style flag WS_NOTABSTOP - it permits the object to receive input focus.
All windows and window controls are initially enabled unless assigned the style flag WS_DISABLED in their definition. The disable and enable commands are used to change this state at run time.
Different object types may be freely mixed. The object(s) to be enabled may be any of the following:
window_id |
A window. |
group_id |
A textbox group or button group. All the objects within the group are enabled. |
box_id, button_id, listbox_id, table_id |
An enabled textbox, button, listbox or table may receive input focus in the dialog command, and input from the input command. |
item_id |
An enabled menu item is available for selection. enable_tabstop cannot be used on a menu item. |
text_id |
A static text item cannot receive input focus whether enabled or not, but enabling it makes its hotkey available. |
EXAMPLE
- Enable a window
enable Window21
- Enable all controls in a group
enable MyWindow.PBGroup
- Enable input focus for a single textbox
enable_tabstop Box54
Enable or disable menu options after testing value of a variable
switch (CurrentFile) {
case = "": /* No file is selected */
disable MenuDelete, MenuRename, MenuCopyNewName
break
default:
enable MenuDelete, MenuRename, MenuCopyNewName
break
}
RELATED TOPICS |