Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

Properties

Samuel Gomes edited this page Nov 25, 2022 · 2 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 uses
': InForm - GUI library for QB64 - Beta version 8
': Fellippe Heitor, 2016-2018 - [email protected] - @fellippeheitor
': https://github.com/FellippeHeitor/InForm
'-----------------------------------------------------------

': Controls' IDs: ------------------------------------------------------------------
DIM SHARED Form1 AS LONG
DIM SHARED PictureBox1 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, Mask and ToolTip properties are separate arrays, and must be used as follows:

Caption(ControlID) = "Desired Caption"
Text(ControlID) = "Desired Text"
Mask(ControlID) = "000-0000"
ToolTip(ControlID) = "Desired Tool tip"

To add a hot-key indicator to captions, use the SetCaption method.

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

Clone this wiki locally