ClassPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version



The class of the header-control control.


An instance of the header-control class. This control serves as a sorting tool for other controls.

There is a good example of a header-control in the Process Dialog (available via the View | Processes menu command) in Allegro. Assigning sort functions to the keys and attaching it programmatically to another control will mean that you can click one of the keys in the header-control and the multi-column list will re-shuffle itself according to another category in the list. You can also stretch or shrink the dialog and the columns stay lined up under the headers.

Adding a header-control to your form

Click the header-control tool on the Component toolbar. Move the mouse cursor to the part of the form where you want to place the control, and click again. The control will appear with colored resizing handles.

Resizing and moving the control

Controls can only be resized and moved on forms during the design stage; the size and location of everything is fixed on a running form.

Resize the control by clicking the mouse cursor and dragging one of the handles to the new size-point. Release the mouse key when you are satisfied with the new size.

Resizing the header-control won't mean proportional changes in the size of the characters inside the list. Change the font property if you want to change the size of the actual characters displayed on the keys of the control.

Move the control by clicking anywhere on it except a resizing handle and dragging it to a new location on the form. Release the mouse key when you are ready to place the control.

Customizing the header-control

Edit the range of the header-control either via the Extended Editor key (the one with the 3 ellipsis) in the Inspector or programmatically.

You can copy one of the existing make-instances and paste it inside the expression, then change the value of the key and the key-name. You can also re-write the whole make-instance from scratch.

Use text-based labels on header control keys; bitmaps and other graphics are not allowed.

Added in release 7.0: on-mouse-in and on-mouse-out event handlers now work for header-controls.

See About how to get sample code for creating controls in cgide.htm, which explains how to use the IDE to create such code.

A diagram of window and widget classes is shown in Widget and window classes in cgide.htm.

GTK Note

This widget is not yet implemented on the GTK platform, where it is somewhat problematic. We are not actually aware of anyone using the widget, so if you need it on Linux or the Mac then let us know. Currently a header-control would appear as a blank window.

Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version