<< Return to Main Index

< Return to Class Index

class CGXButton: public CGXChild

The CGXButton class implements a pushbutton that can be used as a child in a control.

You can specify the text with CGXChild::SetText. The text is drawn with the font of the cell (specified with CGXStyle::SetFont)..

When the user clicks the button, the control's OnClickedButton method is called. The default behavior of this method is to call CGXGridCore::OnClickedButtonRowCol.

To process this event, you can either override the control’s OnClickedButton method or simply override OnClickedButtonRowCol in your CGXGridCore-derived class.

You should create and add the button child in the constructor of your CGXControl-derived class (see example).

The rectangle for the button should be passed to the child object when the control’s OnInitChildren method is called.

#include <gxall.h>

See Also

CGXControl CGXControl::OnClickedButton

CGXButton

Class Members