Window.ButtonClick Method | |
Provide a method that is invoked when a check box, push button, or radio button is clicked with the mouse.
Namespace:
VO
Assembly:
VOGUIClasses (in VOGUIClasses.dll) Version: 2.21
Syntax VIRTUAL METHOD ButtonClick(
oControlEvent
) AS USUAL CLIPPER
[ClipperCallingConventionAttribute(new string[] { ... })]
public virtual Usual ButtonClick(
Usual oControlEvent = default
)
Request Example
View SourceParameters
- oControlEvent (Optional)
- Type: Usual
The ControlEvent object that describes which button was clicked.
Return Value
Type:
UsualRemarks Tip |
---|
Important! This is a callback method used by X#.
Normally, it should not be called in your application code.
|
Button click events (radio, check, and push buttons) are propagated to the window's owner the same way as MenuEvents. For an in-depth discussion on command event propagation, refer to the Programmer's Guide.
You must supply the code to turn a radio button on (and all the other radio buttons off) when a user clicks on a radio button. Similarly, you must also be sure to invert the state of a check box when it is clicked.
Examples
This is a typical example of responding to various button clicks:
1METHOD ButtonClick(oControlEvent) CLASS TeamInfo
2LOCAL oControl AS Control
3LOCAL sSym AS SYMBOL
4oControl := IIf(oControlEvent == NULL_OBJECT, NULL_OBJECT, ;
5oControlEvent:Control)
6SUPER:ButtonClick(oControlEvent)
7
8sSym := oControl:nameSym
9DO CASE
10CASE sSym == #cbHasSponsor
11IF SELF:oDCcbHasSponsor:checked
12SELF:oDCsleSponsorName:enable()
13ELSE
14SELF:oDCsleSponsorName:TextValue := SPACE(25)
15SELF:oDCsleSponsorName:disable()
16ENDIF
17CASE sSym == #rbRecreational .or. sSym == #rbCompetition
18
19
20ENDCASE
See Also