xHarbour Reference Documentation > Class Reference (textmode) xHarbour Developers Network  

HbCheckBox()

Creates a new HbCheckBox object.

Syntax

HbCheckBox():new( <nRow>    , ;
                  <nCol>    , ;
                 [<cCaption>] ) --> oHbCheckBox

Arguments

<nRow>
This is the numeric row coordinate on the screen where the HbCheckBox object is displayed. <nRow> is assigned to oHbCheckBox:row.
<nCol>
This is the numeric column coordinate on the screen where the HbCheckBox object is displayed. <nCol> is assigned to oHbCheckBox:col.
<cCaption>
This is an optional character string holding the caption of the check box. <cCaption> is assigned to oHbCheckBox:caption.

Return

Function HbCheckBox() returns a new HbCheckBox object and method :new() initializes the object.

Description

Objects of the HbCheckBox class are used in text mode applications to display and edit a logical state (On or Off). They are designed to be integrated into the standard Get system and are usually created with the @...GET CHECKBOX command. This command creates a Get() object and an associated HbCheckBox object. Editing the logical edit buffer of the check box is then accomplished by the READ command.

Instance variables

:buffer
Logical edit buffer indicating the (un)checked state.
:capCol
Numeric column position of the caption.
:capRow
Numeric row position of the caption.
:caption
Character string defining the caption.
:cargo
Instance variable for user-defined purposes.
:col
Numeric column position of the HbCheckBox object.
:colorSpec
Color string for display and editing.
:fBlock
Code block evaluated when input focus changes.
:hasFocus
Indicates if the HbCheckBox object has input focus.
:message
Character string to be displayed as message when the check box receives input focus.
:row
Numeric row position of the HbCheckBox object.
:sBlock
Code block evaluated when the (un)checked state changes.
:style
Character string defining the check box delimiters.
:typeOut
Logical value .F. (false).

Methods

:display() --> self
Displays the check box on the screen.
:hitTest( <nMouseRow>, <nMouseCol> ) --> nHitCode
Tests if a check box is hit by the mouse cursor.
:killFocus() --> self
Removes input focus from the HbCheckBox object.
:select( [<lChecked>] ) --> self
Toggles or defines the (un)cheked state.
:setFocus() --> self
Gives input focus to the HbCheckBox object

Info

See also:@...GET, @...GET CHECKBOX, Get(), READ, ReadModal(), ReadVar(), Valtype(), SetColor()
Category: Object functions , Get system
Header:button.ch
Source:rtl\checkbox.prg
LIB:lib\xhb.lib
DLL:dll\xhbdll.dll


Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe