%tb - Bitmap Button

Purpose

To insert a bitmap button or toolbar.

Syntax

winio@('%tb', offondownstat_ctrl)
winio@('%~tb', offondowndisabstat_ctrl, grey_ctrl)
character(*) offondowndisab     (input)
integer stat_ctrl,grey_ctrl     (input/output)
winio@('%n.mtb', . . . )

Modifiers

Tilde (~) - adds a grey control option.

Caret (^) - the call-back function is called when the user clicks on the button. The function name is added to the end of the list of arguments for a given button.

Question mark (?) - A help string for each button is placed in order (in square brackets) after 'tb'.

Description

This control has been superseded by %ib (Image Button) which in turn has been superseded by %mb (Multi-button Toolbar). For new code consider using %mb instead.

off, on, down and disab provide the names of bitmap resources through a resource script.

stat_ctrl is set to 1 when the button is on and to 0 when the button is off.

grey_ctrl is set to 1 when the button is enabled and to 0 when it is disabled (greyed).

n and m are optional and both default to 1. When n is used .m is optional. These provide for a toolbar n buttons wide and m deep. A full set of arguments are required for each button (scanning in order across the rows of buttons) using the same order of arguments as for a single button.

For further information see Tree-view.

Notes

Bitmap resource names can be constructed from known Windows (integer kind=7) handles (see Using the handle of a resource).

Example

winio@('%tb', 'off', 'on', 'dwn', stat)
off BITMAP bt1.bmp      (resource file)
on  BITMAP bt2.bmp
dwn BITMAP bt3.bmp

See also

%bt (Button), %tt (Textual Toolbar), %ga (Gang Controls), %bx (Grey Bar), %ib (Image Button), %mb (Multi-button Toolbar)

 

 

 

Basket
Empty
 
Copyright © 1999-2024 Silverfrost Limited