Common Controls
Compiling
To compile the example:
- Launch EiffelStudio.
- Click Add project
- Browse to $ISE_EIFFEL\examples\wel\comctrls\.
- Choose comctrls.ecf
- Choose the location where the project will be compiled, by default the same directory containing the configuration file. If you select another directory than the default one, please copy icons (*.ico) and resource files (*.rc) from the default directory (the one containing the ecf file) to the new one.
- Click OK.
Running
After launching the program, a window will be displayed as illustrated above. Selecting "Progress bar demonstration" from the "File" menu will update the progress bar to a full state. Leaving the mouse stationary above the track bar, progress bar or toolbar buttons will cause a tooltip control to be displayed.
Under the Hood
There is one WEL_TOOLTIP used for all the controls, but each control adds a new WEL_TOOL_INFO to provide different output for each control. The feature on_notify
has been redefined to handle the Ttn_needtext notification which is posted by a control, and received by the controls parent, when a control needs to display a tooltip. The feature on_menu_select
has been redefined to output the text of the selected menu item in the WEL_STATUS_WINDOW located at the bottom of MAIN_WINDOW
. This sample contains the following classes:
-
APPLICATION_IDS
-
MAIN_WINDOW
-
COMCTRLS_DEMO