2021-07-27
08:29 AM
- last edited on
2021-09-14
12: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 02:11 AM
MyButton* myButton = dynamic_cast<MyButton*> (ev.GetSource ());
2021-07-28 04:13 AM