interface toggle_button create
Allows you to create a new toggle button
Format:
interface toggle_button create |
|---|
toggle_button_name = | a new GI_toggl_btn |
enabled = | boolean |
help_text = | string |
documentation_text = | string |
units = | int_units |
horiz_resizing = | int_H_resize |
vert_resizing = | int_V_resize |
location = | real |
height = | real |
width = | real |
label = | string |
state = | on_off |
on_value = | string |
off_value = | string |
commands = | string |
icon_file = | string |
hit_icon_file = | string |
Example:
interface toggle_button create & |
|---|
toggle_button_name = | tgb & |
enabled = | yes & |
help_text = | text_help & |
documentation_text = | doc_help & |
units = | relative & |
horiz_resizing = | attach_left & |
vert_resizing = | attach_top & |
location = | 0.0, 0.0 & |
height = | 0.5 & |
width = | 0.5 & |
label = | button_label & |
state = | on & |
on value = | on & |
off value = | off & |
commands = | "interface dialog display dialog=.gui.info_window" & |
icon file = | c:/images.jpg & |
Hit icon file = | c:/images1.jpg |
Description:
Parameter | Value Type | Description |
|---|
toggle_button_name | A New GI_toggl_btn | Specifies the name of a new toggle button |
enabled | Boolean | Activates the toggle button |
help_text | String | Specifies the help text |
documentation_text | String | Specifies the documentation text |
units | Int_units | Specifies the toggle button size in pixels or units relative to Adams window |
horiz_resizing | Int_h_resize | Specifies the attachment and scaling option for toggle button |
vert_resizing | Int_v_resize | Specifies the attachment and scaling option for toggle button |
location | Real | Specifies the location of the toggle button |
height | Real | Specifies the height of the toggle button in terms of relative units or pixels |
width | Real | Specifies the width of the toggle button in terms of relative units or pixels |
label | String | Specifies label of the toggle button |
state | On_Off | Specifies the current status of the toggle button |
value | String | Specifies the current status of the toggle button |
commands | String | Specifies the command to be executed for the toggle button operation |
icon_file | String | Specifies the address of the image for icon when button is inactive |
Hit_icon file | String | Specifies the address of the image for icon when the button is active |
Extended Definition:
1. The name of the toggle button to be created is specified initially. If parameter ‘Enabled’ is set to ON, the toggle button will be preactivated.
2. The pop-up help and documentation help can be specified in appropriate dialog boxes.
3. The size of the toggle button can be specified in terms of the number of pixels. Alternatively, the size can also be stated as relative to the Adams window.
4. The vertical and horizontal resizing options are used to adjust the placement of the option menu in the existing dialog box. For example, attach_left; attach_top options for Horiz_resizing and Vert_resizing will place the option menu on the top left corner of the dialog box. The location can also be specified from the top left corner by adjusting the parameter, ‘location’.
5. The size of the toggle button window can be specified with respect to the Adams window size. The value for parameter height and width should be a real number between 0.0 and 2.0, where 2.0 represents the height of the Adams View window. Therefore, a value of 1.0 will set the information window to be half as high as the Adams View window.
6. If the Label is specified, then the string associated will appear with a toggle window, where click and unclick will be denoted by a ‘tick’. Alternatively, if the iconic image is selected for the toggle button, then the iconic button will be displayed with corresponding image on it, with no label of ‘tick-mark’. The label for an axis will be displayed near the axis, its placement depending on where the axis is placed. The label can be of unlimited length, but may not all fit on the plot if it is very long. If the string contains spaces, it must be enclosed in quotation marks. The parameter ‘icon_file’ specifies the name of the file that contains the icon definition for use on an iconic menu.
7. The default state of the toggle button is specified by ‘state’, whether it is on or off. Otherwise, the values are specified as string where the status of the toggle button can marked. It is mutually exclusive with the ‘state’ mentioned above.
8. The parameter ‘command’ specifies the name of the command to be executed when the toggle button status is ON.
9. The push button iconic image can be changed by specifying the ‘Hit_icon_file’, that is, when the push button is active, it will show one image on the button, and when it is toggled or inactive, the iconic image will toggle to another image file specified.
Tips:
The parameters, ‘state’ and ‘value’, are mutually exclusive. The display and undisplay of commands work when any menu box is open, as the button will be created on existing menu