CodeGen Documentation
CodeGen Documentation

Button Loop Expansion Tokens

 

Button loop expansion tokens are used to insert information about the current button being processed within the context of a button loop into the output stream. Button loop tokens can only be used inside a button loop.

 

Button Loop Token

Description

<BUTTON_CAPTION>

 

Inserts the buttons caption. In UI Toolkit a button can have a caption, or an image, but not both. The <IF CAPTION> and <IF IMAGE> expressions will allow you to provide the appropriate code.

 

<BUTTON_COLPX>

 

Inserts the calculated column position for the button in pixels. The column position is calculated by adding the sizes of all preceding buttons, with 15 pixels of space allowed before each button.

 

<BUTTON_ELB>

 

Inserts the name of the ELB containing the buttons method. Refer to the discussion relating to <BUTTON_METHOD>. Methods are very rare, and specifying an external ELB is even rarer. You can use the expression <IF ELB> to determine if a button method ELB is specified.

 

<BUTTON_IMAGE>

 

Inserts the name of the buttons image file. In UI Toolkit a button can have a caption, or an image, but not both. The <IF CAPTION> and <IF IMAGE> expressions will allow you to provide the appropriate code.

 

<BUTTON_METHOD>

 

Inserts the name of the buttons method. In UI Toolkit a button method may be specified as the event handler to be executed when the button is clicked. This is rare however, most applications relying on the fact that if a button method is not specified then the name of the button is signaled as a menu entry.

Most buttons will not have a method specified. You can use the <IF METHOD> expression to determine if a method is specified.

<BUTTON_NAME>

 

Inserts the Name of the button. All buttons will have a name defined.

<BUTTON_NUMBER>

 

Inserts the one-based index number of the button in the windows Buttons collection.

<BUTTON_QUICKSELECT>

 

Inserts the buttons explicitly specified quick-select character.

<BUTTON_ROWPX>

 

Inserts the calculated row position for the button in pixels. The calculation takes into account the pixel height of the window, as well as the additional space which will have been allowed in the window height when the window size was calculated. If code generation is based on an existing UI Toolkit window then the height of the source window is used to calculate the value, otherwise the number of fields in the structure is used.

 

<BUTTON_WIDTHPX>

 

Inserts the width of the button in pixels. The width is calculated by multiplying the number of characters in the buttons caption by 12 pixels per character, and this value can be overridden using the -cw option. If the calculated button width is less than 75 pixels then 75 pixels is used.

 

 

 


Copyright © 2021  Synergex International, Inc.