2021-07-27
05:29 PM
- last edited on
2021-09-14
09:25 AM
by
Noemi Balogh
if(ev.GetSource() == some button) { do something ... }
My problem is that the ev.GetSource() does not return my Button class pointer but it returns DG::ButtonItem pointer which does not contain the newly created functions like GetName().
class MyButton : public DG::Button {
public:
GS::UniString GetName();
void Do_HTTPRequest();//Based on the name of the button
private:
GS::UniString name;
}
class MyButtonObserver : public DG::ButtonItemObserver {
}
is there any way to override the OnClick event of a button?2021-07-28 11:11 AM
MyButton* myButton = dynamic_cast<MyButton*> (ev.GetSource ());
2021-07-28 01:13 PM