KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Creating Boolean Buttons and Check Boxes
PRODUCT: 4D | VERSION: 13.4 | PLATFORM: Mac & Win
Published On: June 19, 2014

Buttons and check boxes are defaultedly typed as Longints. By declaring the variable name in code with the C_BOOLEAN call in the database a button or check box can be set to a Boolean since Booleans can simply be converted to a number.




The image shows two pairs of checkboxes not checked and two pairs checked. The one labled Int has it's variable left as the default typing of a Longint, which the Bool's variable was declared as a bool using the following code:

  C_BOOLEAN(checkBool)

Typically it is recomended to declare all variables in code to prevent confusion thus typing of the buttons to a prefered type should be done in code.