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

HbRadioGroup()

Creates a new HbRadioGroup object.

Syntax

HbRadioGroup():new( <nTop>   , ;
                    <nLeft>  , ;
                    <nBottom>, ;
                    <nRight>   ) --> oHbRadioGroup

Arguments

<nTop>, <nLeft>, <nBottom>, <nRight>
These numeric parameters indicate the screen coordinates for the upper left and lower right corner of the radio button group output. The range for rows on the screen is 0 to MaxRow(), and for columns it is 0 to MaxCol(). The coordinate 0,0 is the upper left corner of the screen. !END

Return

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

Description

Objects of the HbRadioGroup class are used in text mode applications to display multiple options and select one of it. A single option is represented by a HbRadioButton() object. Radio buttons must be added to a HbRadioGroup object with its :addItem() method. A radio group object maintains multipe radio buttons. Both classes are designed to be integrated into the standard Get system and are usually created with the @...GET RADIOGROUP command. This command creates a Get() object and an associated HbRadioGroup object. Editing the edit buffer of the radio button group is then accomplished by the READ command.

Instance variables

:bottom
Numeric bottom row coordinate of the radio button group display.
:buffer
Numeric ordinal position of the selected radio button.
: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.
:coldBox
Box string for border when the radio button group has no input focus.
:colorSpec
Color string for display and selection.
:fBlock
Code block evaluated when input focus changes.
:hasFocus
Indicates if the HbRadioGroup object has input focus.
:hotBox
Box string for border when radio button group box has input focus.
:itemCount
Numeric value indicating the total number of radio buttons in the group.
:left
Numeric left column coordinate of the radio button group display.
:message
Character string to be displayed as message when the radio button group receives input focus.
:right
Numeric right column coordinate of the radio button group display.
:top
Numeric top row coordinate of the radio button group display.
:typeOut
Logical value indicating if a radio button group is empty.

Methods

:addItem( <oHbRadioButton> ) --> self
Adds a new radio button to a radio group
:delItem( <nPos> ) --> self
Removes a radio button from a HbRadioGroup object.
:display() --> self
Displays the radio button group on the screen.
:getAccel( <nKey>|<cChr> ) --> nPos
Checks if an accelerator key is pressed for a radio button.
:getItem( <nPos> ) --> oHbRadioButton
Retrieves a radio button object.
:hitTest( <nMouseRow>, <nMouseCol> ) --> nHitCode
Tests if a radio group is hit by the mouse cursor.
:insItem( <nPos>, <oHbRadioButton> ) --> oHbRadioButton
Inserts a new radio button into a radio group
:killFocus() --> self
Removes input focus from the HbRadioGroup object.
:nextItem() --> self
Selects the next radio button in the radio group.
:prevItem() --> self
Selects the previous radio button in the radio group.
:select( <nPos> ) --> self
Changes the Selected sate of a radio button in a radio group.
:setColor( <cColor> ) --> self
Changes the color of all radio buttons in a group.
:setFocus() --> self
Gives input focus to the HbRadioGroup object.
:setStyle( <cStyle> ) --> self
Changes the style attribute of all radio buttons in a group.

Info

See also:@...GET, @...GET RADIOGROUP, Get(), READ, ReadModal(), ReadVar(), Valtype(), SetColor()
Category: Object functions , Get system
Header:button.ch
Source:rtl\radiogrp.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