CheckBox                                                                  Object

ADDOBJECT "CheckBox", name, xpos, ypos, width, height

ADDOBJECT " TriButton ", name, xpos, ypos, width, height

Description

CheckBox and TriButton are used to display a button object with a check mark toggle that floats over the output window.  TriButton is the same as Check Box, except that it has a third grayed out state.The required component, name, is the name of a variable that is added to the program to reference the object, it must follow standard variable naming conventions. The required components, xpos, ypos, width, and height are numeric expressions that set the location and size of the object in pixels, measured from the upper left corner. The Value property is 0, when the check mark is not shown; the Value property is 1, when the check mark is shown.

Properties Supported (see "Properties")

Alignment, BackColor, Caption, Enabled, FontBold, FontItalic, FontName, FontSize, FontStrikethru, FontUnderline, ForeColor, Height, Hwnd, Left, Name, ParentHWnd, TabStop, Tag, Text, Timer, Top, Value*, Visible , Width, WindowLong

*The Value property is an Integer (0 or 1). The TriButton has an additional value of 2 for Indeterminate.

Methods Supported (see "Methods")

Hide, Move, SetFocus, Show

Events Supported (See "Events")

Click, DblClick, GotFocus, KeyDown, KeyPress, KeyUp, LostFocus, Timer

Example

REM CheckBox Example

'CheckBox is a buttonwithacheckmarktoggle

ADDOBJECT "CheckBox","Check",10,10,200,20

Check.BackColor = Output.BackColor

Check.Text = "CheckBox Object"

Check.Value = 1

SUB Check_Click

  PRINT "CheckBox Value: " & Check.Value

END SUB

Output

ScreenHunter_1

 

Example

REM TriButton Example

ADDOBJECT "TriButton", "Button", 120, 120, 100, 20

Button.Value = 2 'set to disabled

Output

Tributton

Related Items

ADDOBJECT, Events, Methods, Properties