Navigation:  Reference > Form Objects >

TTASCheckBox

Print this Topic Previous pageReturn to chapter overviewNext page

Use this object to replace a standard Y/N question.  If the user checks the box the value returned to the field attached to the object will be Y, if unchecked, it will return N.  You can also make the attached field a type L (logical).  In that case the object will return .True. (clicked) or .False. (unclicked) as would be expected.

 

PALETTE ICON & EXAMPLE

 

 

PROPERTIES

The following are the properties that apply to this object.  Some are defined in Common Properties and are linked to their appropriate page.

 

Appearance

 

Alignment

 

CaptionThis is the text that is displayed on the left or the right of the checkbox depending on the value in Alignment.

 

Color

Ctl3D

Cursor

ParentColor

 

Behavior

 

Enabled

TabOrder

TabStop

Visible

 

Entry

 

EntryBGColor

EntryFont

EntryUseDflt

 

Font

 

Font

ParentFont

 

Hint

 

Hint

ParentShowHint

ShowHint

 

Misc

 

HelpContext

Name

PopupMenu

Tag

 

Other

 

Anchors

 

CheckedIf the box is checked this property will return .True.  You can also preset the Checkbox by setting this value.

 

Constraints

ParentCtl3D

ReturnIsTab

 

StateIf the Checkbox is checked this will return cbChecked, if not it will return cbUnchecked.  This property can be modified during runtime.  The values are defined in COMPILERCONSTANTS.TXT.

 

Position

 

Height

Left

Top

Width

 

TAS Pro

 

DfltValueIf you want to set the checkbox use Y or N here.  The default value is N.  This can be changed during runtime.

 

FieldNameNOTE: if you use get_obj_prop() you must have a field name here if blank use can use "NONE" Also Pre post events will not fire without a field or the word NONE here.

 

                        NOTE: If you use an alpha 1 field the value will be Y or N if you use this as a logical it will be true or false.

 

                         NOTE : Also Pre post events will not fire without a FieldName or the word NONE here. (for both Pre and Post events) You must have a field name here, or if blank you can use "NONE"

 

FldModifiedNOTE:  This is a runtime only property and will not show up in the Object Inspector.

FocusOnObject

HelpStatusBar

HelpStatusBarMsg

KeyTrapHint

KeyTraps

ValidMsg

 

EVENTS

This object has events that are called depending on what the user does.  The events are routines in your program that may return a value (generally .True. or .False.) or just alert your program that something is happening.  An event looks to your program for a special label.  It is made up of the object Name, a period (.) and the Event name (listed below).  For example, the Click event below would be: ObjectName.Click:

 

ClickThis event is called if the user clicks on the object. you will uses this in place of change  event for a checkbox.

 

DispThis event is called when the field that is attached to the object is to be refreshed on the screen.  This can happen when a record is read, after a calculation, etc.

 

PostThis event is called when the user moves from the current object to another.  By default this event will return .True. If you return .False. This will keep the user from leaving this object. This will stop the process from continuing, This can be used to make sure settings are proper after leaving the object.  To force the user to stay on the current object, if there is a problem, you may also use the Valid event instead of this.

 

PreThis event is called when the user moves into an object.  If you use this event you must return .True. or .False. when you return (RET) from the routine.  If you return .True. the user is allowed to access the object.  If you return .False. the object that was active before they got to this object will get the focus again.  This keeps the user from accessing an object that you don't want to be active.  Commonly used in application where some fields are accessible sometimes (RET .TRUE.) and aren't others (RET .FALSE.).

 

The process by which these events are called is:

 

Pre - This occurs when focus changes to the object.

 

Change - During field entry. NOTE : Change Is not valid for TTASCheckBox

 

Post - Called after Valid returns .True. (if there is a Valid event) and before the Pre for the next object.

 

Disp - Is called anytime the form/object is refreshed.

 

NOTE : Also Pre post events will not fire without a FieldName or the word NONE here. (for both Pre and Post events) You must have a field name here, or if blank you can use "NONE"

 

 

 


Page url: http://www.cassoftware.com/tas/manual/ttascheckbox.htm