Silverfrost Logo About Us | Contact Us
 

%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 superceded by %ib. For new code use %ib 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 contructed from known Windows 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

 

 

 

Copyright © 1999-2017 Silverfrost Limited