Search found 8 matches

by aalien
Sat Mar 03, 2007 5:26 pm
Forum: C++ Development
Topic: how access added wxNotebookPage and refresh members
Replies: 5
Views: 745

finally i figured it out, how it suppose to be class Mypagetab : public wxNotebookPage { private: public: Mypagetab (wxWindow * parent, SomeClassPtr *ScPtr;); Mypagetab (wxWindow * parent = NULL); virtual void RefreshMembers(); }; class Kipagetab : public Mypagetab { public: Kipagetab(wxWindow * par...
by aalien
Sun Jan 28, 2007 8:05 pm
Forum: C++ Development
Topic: how access added wxNotebookPage and refresh members
Replies: 5
Views: 745

Oops, sorry. I didn't read the doc closely enough. So you need: int page = event.GetSelection(); if ( page == -1 ) return; Mypagetab* page = (Mypagetab*)GetPage(page); that doesn't work at all, to be honest I don't understand how it can work Mypagetab* page = (Mypagetab*)GetPage(page); [/code] i of...
by aalien
Sun Jan 28, 2007 5:29 pm
Forum: C++ Development
Topic: how access added wxNotebookPage and refresh members
Replies: 5
Views: 745

Hi, Mypagetab* page = (Mypagetab*)event.GetSelection(); thanks for advice about using changed instead changing, but your above access solution does not work (see how i did based on above in code) i've already solve problem with access (see code comment) class Mypagetab : public wxNotebookPage { pri...
by aalien
Sun Jan 28, 2007 2:36 pm
Forum: C++ Development
Topic: how access added wxNotebookPage and refresh members
Replies: 5
Views: 745

how access added wxNotebookPage and refresh members

Hi All thanks for last help, now I have another problem: I have to refresh controls (for example GRid) basing on some other Class, I decided to determine which notebookpage was changed, and if it is shown to execute my refreshfuction. So I'm adding some overloaded notebookpages to notebook, and now ...
by aalien
Sat Jan 27, 2007 11:04 pm
Forum: C++ Development
Topic: How can I add event & function to button from other clas
Replies: 6
Views: 953

I found bug, it should be this->Connect(ex_Button->GetId(),wxEVT_COMMAND_BUTTON_CLICKED,wxCommandEventHandler(pageKI::OnButton),0,parent->GetPreviousHandler()); instead this->Connect(ex_Button->GetId(),wxEVT_COMMAND_BUTTON_CLICKED,wxCommandEventHandler(pageKI::OnButton),0,parent->GetParent());
by aalien
Sat Jan 27, 2007 7:33 pm
Forum: C++ Development
Topic: How can I add event & function to button from other clas
Replies: 6
Views: 953

You need to declare and define the following function: void pageKI::OnButton (wxCommandEvent &event) // event may be unused: WXUNUSED(event) I did, but application is crashing when I click ex_Button. Code I modified is marked by '*' //----------------------------------------BEGIN guipageki.h-------...
by aalien
Sat Jan 27, 2007 6:57 pm
Forum: C++ Development
Topic: How can I add event & function to button from other clas
Replies: 6
Views: 953

thank you for your response i did something like that: //----------------------------------------BEGIN PART OF guipageki.cpp---------------------------------------- pageKI::pageKI(wxWindow * parent, wxString fname, wxString stream):wxNotebookPage(parent, wxID_ANY) { KIstatictextFname = new wxStaticT...
by aalien
Sat Jan 27, 2007 6:21 pm
Forum: C++ Development
Topic: How can I add event & function to button from other clas
Replies: 6
Views: 953

How can I add event & function to button from other clas

Hi All I'm pretty new to wxWidgets, and I have a simple problem with events. How can I add event and function to button from other than main classs. In code below i marked the problem button My project looks like that : //----------------------------------------BEGIN stdwx.h-------------------------...