Skip to content

Properties

FellippeHeitor edited this page Dec 21, 2016 · 11 revisions

Controls are manipulated with the following properties. Notice that not all of them apply to every control. You access a control's property by manipulating the Control() array. ControlID refers to a unique ID that's assigned to each control at load time.

In the beginning of the .bas program that InForm generates, you will see the following section:

': This program was generated by
': InForm - GUI system for QB64 - Beta version 1
': Fellippe Heitor, 2016 - fellippe@qb64.org - @fellippeheitor
'-----------------------------------------------------------

': Controls' IDs: ------------------------------------------
DIM SHARED Form1 AS LONG
DIM SHARED Button1 AS LONG

The shared variables above contain your controls' IDs, and you use them with the Control() array.

Syntax:

Control(ControlID).Property = Value

Caption, Text and Tool tip properties are separate arrays, and must be used as follows:

Caption(ControlID) = "Desired Caption"
Text(ControlID) = "Desired Text"
ToolTip(ControlID) = "Desired Tool tip"

Changes to properties are usually applied immediately, but you will eventually need to request __UI_ForceRedraw.

Clone this wiki locally