RX Switch is a custom control representing a switch. The icon for this object is on the enhanced page.
PALETTE ICON & EXAMPLE
Description
RxSwitch is a simple component that displays a switch depending on whether the state property is "On" or "Off". It's GlyphOn and GlyphOff properties determine what bitmaps are used. so you can customize this with your own bitmaps.
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
Caption | This is the text that is displayed on the Switch. |
Behavior
Font
Hint
Misc
Other
BorderStyle Options are none and single
GlyphOff This is the bitmap that will be displayed in the off state.
GlyphOn This is the bitmap that will be displayed in the on state.
StateOn This property allows you to check the state of the switch.
TextPosition This determins the text position options are tpTop, tpBotton,tpRight, tpLeft, tpRight, tpNone.
ToggleKey |
Position
EVENTS
This object has a single event that is called if your user clicks the switch. This event looks to your program for a special label. It is made up of the object Name, a period (.) and the Event name (Click). The full event name would be ObjectName.Click:. You would not return a value from the program, just a simple RET is all that is required. So, the user clicks the switch, if the event label exists the routine is called, you return from the routine, and the user has control again.
NOTE: You can have multiple buttons call the same routine by 'stacking' the event labels on top of each other. For example, if you had two buttons you wanted to call the same event, you could do the following:
btnFirstButton.click:
btnSecondButton.click:
//event routine code would go here.
ret
The labels are not part of the code executed. They are just place keepers and tell the program where to go.
Page url: http://www.cassoftware.com/tas/manual/trxswitch.htm