sjgui::CButtonCtrlTmpl< Tlabel, Tbase > Class Template ReferenceButton, checkbox, multiple state button, with the text. More...
Inheritance diagram for sjgui::CButtonCtrlTmpl< Tlabel, Tbase >:
Detailed Descriptiontemplate<class Tlabel, class Tbase>
Button, checkbox, multiple state button, with the text.
|
Tlabel | - label class used for displaying label (use CLabelCtrlTmpl) |
Tbase | - base class (use CWndCtrlBase) It can serve as push button, as check box, as multiple state button. with the text label. When button was pressed, function IsPushed() returns true, then IsPushed() will return true, unless you reset the button state with Reset(). Button could be pressed when it is in focus by LEFT MOUSE BUTTON, SPACE or ENTER keys. Usual usage is in the OnKeyUp(iKey) function. The following is an example of ussage as a push button: // class with a button class CYourClass: public sjgui::CWnd { sjgui::CButton m_btnOk; public: // one should register child in constructor CYourClass(){RegisterChild(&m_btnOk);} // in this function one process the event virtual void OnKeyUp(int& iKey) { if(m_btnOk.IsPushed()) { m_btnOk.Reset(); // important to call this // ... do what you want to do } } } |
|
Returns true if button was pushed. Do not forget to reset the button with Reset() command. |
|
Label. Must be positioned in the derived class. |
News Documentation:
Documentation Useful links:
|
Last modified: