>> << Ndx Usr Pri Phr Dic Rel Voc !: wd Help User

# Child Classes

The class defines the appearance and behavior of the control. The classes are:

    button

pushbutton

    check box

check box

    combobox

combination of edit and listbox

    combodrop

dropdown combo box

    combolist

combination of edit and listbox

    edit

single line edit box

    editm

multiline edit box

    groupbox

group box

    isigraph

graphics box

    isipicture

picture from a BMP, WMF, or ICO file

    listbox

list box

    radiobutton

radio button

    scrollbar

horizontal scrollbar

    scrollbarv

vertical scrollbar

    static

static text

    staticbox

display box

    progress

progress bar

    richedit

single line rich edit control

    richeditm

multiline rich edit control

    spin

horizontal spin button

    spin

vertical spin button

    tab

tab control

    trackbar

horizontal trackbar

    trackbarv

vertical trackbar

button
A button simply initiates a Windows event when pushed. Possible styles are:

-     bs_defpushbutton

the default pushbutton. Pressing Enter has the same effect as clicking this button.

-     bs_ownerdraw

a button with a picture from a graphics file

checkbox
A checkbox allows a two way selection - checked or unchecked. The only style is:

-     bs_lefttext

the caption is displayed on the left, instead of on the right.

Use the `set` command to set the value of a checkbox, for example, to check control `cb`:

       wd 'set cb 1'

The result of `wd'q'` contains the current value of each check box.

combobox
combodrop
combolist
A combobox is a combination of a listbox and an edit box. You can enter a response into the edit box, or select a response from the listbox. You may select only one item in a combobox.

A combodrop is similar to a combobox, but initially shows only the edit box, and allows the list box to appear when selected.

A combolist is similar to a combobox, except that you may select only from the list box, and may not enter any response into the edit box.

Class styles are:

-     cbs_autohscroll

allow horizontal scrolling of the edit box

-     cbs_sort

sort entries alphabetically

Use the `set` command to set the possible selections in a checkbox. This can be a list of names, that may be delimited by `LF, EAV` or ". For example:

       wd 'set cbox red green blue brown'
       wd 'set cbox "red" "green" "blue" "brown"'
       wd 'set cbox ',; (;:'red green blue brown') ,each LF

Use `setselect` to set the selection. For example, the following sets item 2:

       wd 'setselect cbox 2'

The result of `wd'q'` contains the current value and selection of each combobox. For example:

    ...
    +------------+-----------------------------+
    |cbox        |blue                         |
    +------------+-----------------------------+
    |cbox_select |2                            |
    +------------+-----------------------------+

edit
editm
An edit control is a single-line box, and an editm control is a multiline box, in which text can be displayed and edited. Edit control styles are:

-     es_autohscroll

use horizontal scroll bars if required

-     es_autovscroll

use vertical scroll bars if required

-     es_center

center text

-     es_lowercase

lowercase text only

-     es_readonly

display text as read-only

-     es_right

right justify text in control

-     es_uppercase

uppercase text only

Use the set command to write text to an edit control. For example:

       wd 'set edit *Jeremy Fisher'

The result of `wd'q'` contains the current text for each edit box, and indices of any selected text:

    ...
    +------------+-----------------------------+
    |edit        |Peter Rabbit                 |
    +------------+-----------------------------+
    |edit_select |6 12                         |
    +------------+-----------------------------+

groupbox
A groupbox control is a box used to group controls, most often radiobuttons. There are no class styles.

isigraph
An isigraph control is a window that can display graphics. First create an isigraph control, then use graphics commands to create and display the graphics. All graphics commands start with `g`. Graphics are displayed only when the `gshow` command is given.

Graphics commands apply to the currently selected isigraph control. The graphics window has coordinates running from (0,0) in the bottom left hand corner to (1000,1000) at the top right.

See the demos, Studio|Demos|isigraph.

isipicture
An isipicture control displays an image from a file. The file may be a DIB (device independent bitmap), WMF (Windows metafile) or ICO (icon file). DIB files usually have a file extension of .bmp.

The `set` command sets the filename. For example, to display the J logo icon:

       wd 'set isipicture *system\examples\data\j.ico'

listbox
A listbox control displays a list of items that can be selected by the user. Listbox control styles are:

-     lbs_extendsel

extended select holding down the Shift key

-     lbs_multicolumn

display in multiple columns

-     lbs_multiplesel

allow multiple selections

-     lbs_ownerdrawfixed

create an ownerdrawn listbox

-     lbs_sort

sort entries alphabetically

Use the `set` command to put items in the listbox (as in combobox above).

In the result of `wd'q'`, multiple selections are delimited by `LF`. For example:

    +--------------+-----------------------------+
    |listbox       |green blue brown             |
    +--------------+-----------------------------+
    |listbox_select|1 2 3                        |
    +--------------+-----------------------------+

progress
A progress control displays a bar used to indicate the status of a program. Use the `set` command to set values between 0 and 100. For example, to indicate the half way stage:

       wd 'set pg 50'

radiobutton
radiobutton controls typically allow a single selection from a group of controls. Selecting one control switches the others off. The only style is:

-     bs_lefttext

the caption is displayed on the left, instead of on the right.

Use the `set` command to set the value of a radiobutton, for example, to check control `rb`:

       wd 'set rb 1'

The result of `wd'q'` contains the current value of each radiobutton.

richedit
richeditm
A richedit control is a single line edit box, and a richeditm control is a multiline edit box, each containing rich edit text. Class styles are:

-     es_autohscroll

use horizontal scroll bars if required

-     es_autovscroll

use vertical scroll bars if required

-     es_center

center text

-     es_readonly

display text as read-only

-     es_right

right justify text in control

-     es_sunken

display sunken

For more information, see the Richedit Control section later in this chapter.

scrollbar
scrollbarv
A scrollbar control displays a horizontal scrollbar, and a scrollbarv displays a vertical scrollbar. There are no class styles.

The `set` command sets four values for the scrollbar: leftmost (or top) position, current position, rightmost (or bottom) position, and the size of change resulting from a click in the area between the thumbbox and either end of the scrollbar.

       wd 'set sb 0 500 1000 50'

A single parameter sets the current position:

       wd 'set sb 600'

Clicking a scrollbar signals an event. The result of `wd'q'` has the current position of the scrollbar. For example:

    ...
    +----------+----------------------------+
    |sb        |550                         |
    +----------+----------------------------+

spin
spinv
A spin control displays two arrows horizontally, and a spinv control displays the arrows vertically. Clicking an arrow initiates a Windows event, and the result of `wd'q'` is `_1` for the down or left arrow, `1` for the up or right arrow.

static
A static control is used to display text. It is never active. Static control styles are:

-     ss_center

center text

-     ss_leftnowordwrap

left justify, no word wrap

-     ss_noprefix

allow & characters in control

-     ss_right

right justify text

-     ss_simple

static text control

staticbox
A static control is used to display boxes with various types of frames and backgrounds. It is never active. Staticbox control styles are:

-     ss_blackframe

black frame

-     ss_blackrect

black rectangle

-     ss_etchedframe

etched frame

-     ss_etchedhorz

etched horizontally only

-     ss_etchedvert

etched vertically only

-     ss_grayframe

gray frame

-     ss_grayrect

gray rectangle

-     ss_sunken

sunken

-     ss_whiteframe

white frame

-     ss_whiterect

white rectangle

tab
A tab control is used to display several Windows controls on tab forms. Class styles are:

-     tcs_button

display tabs as buttons

-     tcs_multiline

allow tabs to be displayed in several lines

For more information, see the Tab Control section later in this chapter.

trackbar
trackbarv
A trackbar control displays a horizontal trackbar, and a trackbarv displays a vertical trackbar. Class styles are:

-     tbs_autoticks

display tick marks along control

-     tbs_both

display tick marks on both sides of control

-     tbs_enableselrange

enables `setselect` to mark a range on the trackbar

-     tbs_left

display thumb pointing to left / tick marks on left

-     tbs_nothumb

do not display a thumb control

-     tbs_noticks

do not display any tick marks

-     tbs_top

display thumb pointing to top / tick marks on top

The set command sets up to five values for the trackbar: leftmost (or top) position, current position, rightmost (or bottom) position, and the size of change resulting from a click in the area between the thumbbox and either end of the trackbar, and line size.

       wd 'set tb 0 3 20 1 1'

A single parameter sets the current position:

       wd 'set tb 4'

Clicking a trackbar signals an event. The result of `wd'q'` has the current position of the trackbar. For example:

    ...
    +------------+--------------------------+
    |tb          |4                         |
    +------------+--------------------------+

>> << Ndx Usr Pri Phr Dic Rel Voc !: wd Help User