Aztec® Programming Language
Version 1.1 Alpha 2

Copyright © 2010-2017, Aztec Development Group, All Rights Reserved

Download Aztec

Search        Contact Us

I look at the floor and I see it needs sweeping...

Still my guitar gently weeps.

- George Harrison

 

aztec.ui.ToggleButton

public class ToggleButton from<Button>

Base

Window

Control

Button

ToggleButton

The ToggleButton class provides a toggle button control. It maintains an on/off "check state", and it can consist of text and/or a bitmap (if "push-like" flag is true).

ToggleButton Methods

ToggleButton() Constructor for the ToggleButton class
IsChecked() Returns true if the toggle button is in a "checked" state.
Check() Sets the check state of the toggle button

Derived Classes

See Also

 


ToggleButton()

public method ToggleButton(Window Parent, int XPos, int YPos, int Width, int Height, string Label, BitMap ButtonIcon = null, bool RadioFlag = false, bool PushLike = false)

Parameters

XParent

Parent window for the button control

Pos

One based X position of control relative to parent

YPos

One based Y position of control relative to parent

Width

Initial width of the control in pixels

Height

Initial height of the control in pixels

Label

String to be used for the Button control

ButtonIcon

Bitmap to embed in the button (or null)

RadioFlag

Radio flag to determine toggle dependence/independence

PushLike

Controls appearance of the button

Return Value

None

Description

Constructor for the ToggleButton class. The toggle button maintains an on/off check state and supports a "radio flag". If the radio flag is false, the button's "check state" is clicked on and off independently of other buttons. If the radio flag is true, clicking the button's check state affects other radio buttons at the same level (same parent). Only one radio button can be on at a time, so when one is clicked on, all others are checked off.

 

The toggle button also supports a "push-like" flag. If false, the button is presented as text preceded by either a square check box (radio is false) or a circular check box (radio is true). If "push like" is true, the button is presented with a "push button" appearance that stays in when checked, and stays out when not checked.

 

ToggleButton Class


IsChecked()

public method<bool> IsChecked()

Parameters

None

Return Value

True if the toggle state is checked

Description

This method returns true if the current state is checked and false if the state is unchecked.

 

ToggleButton Class


Check()

public method<bool> Check(bool CheckState = true)

Parameters

CheckState

True if state will be checked, false if unchecked

Return Value

The previous check state

Description

This method sets the current check state for the toggle button. If the button is part of a radio group (radio flag is true), the check state of all others in the group will be turned off.

 

ToggleButton Class

 

Copyright © 2010-2017

Aztec Development Group

All Rights Reserved

Download Aztec