Controls Overview

Before an object is created, the programmer must:

  • Open a channel to the SYSGUI device

  • Create a window to contain the GUI object(s)

Each control must be given a unique ID when it is created. The ID serves two purposes; it is used to manipulate the control by referencing its ID, and it determines the sequence for keyboard navigation. Keyboard navigation is optional but may be enabled on the window containing the items by using the window's keyboard navigation flag ($00010000$). Once keyboard is enabled, pressing Tab moves the keyboard into focus through the objects, beginning with the object with the lowest ID and continuing sequentially toward the next higher ID.

The ID may be any number between 1 through 32767. However, the numbers in the range 1-99 and 32000..32767 are reserved and should be avoided in most cases. The following reserved numbers have special meaning and may be used if the associated behaviors are desired. The special purpose numbers are:


Object Affected




Pressing Enter selects the default button



Pressing Esc selects Cancel

32027 (*)

Menu Item

This menu item activates a clipboard "Cut" operation

32028 (*)

Menu Item

This menu item activates a clipboard "Copy" operation

32029 (*)

Menu Item

This menu item activates a clipboard "Paste" operation




See Button Control for more information.

*See Menus for more information.


The CTRL() function may be used to retrieve information about items in a SYSGUI window. Several CTRL() functions are specific to a particular control while others are more general. For example, CTRL() function 1 always returns the location and size of the control and function 4 always returns its class and type.

Look and Feel

When BBx is using the operating system's 'look and feel,' changing default colors and borders on controls may not have any impact as they are superseded by the 'look and feel' of the operating system. If custom colors and borders are required, disable the theme support in Visual PRO/5 as documented in the Theme Support section of  The config.bbx Configuration File or use a custom skin in BBj. See also Visual PRO/5 6.0 Gives Apps an XP or Vista Contemporary Look and Feel in the BASIS International Advantage: