click on wxTreeCtrl

M Nealon malcolm.nealon at gmail.com
Fri Nov 16 02:38:16 PST 2007


Change your code to use Message boxes, and you will see that your code
does indeed work (insofar as the events are being generated and the
routines are being called).

void MyTreeCtrl::OnItemActivated(wxTreeEvent& event)
{
    wxMessageBox( "OnItemActivated even fired",
                  "OnItemActivated", wxOK | wxICON_INFORMATION );
};

void MyTreeCtrl::OnSelChanged(wxTreeEvent& event)
{
    wxMessageBox( "OnSelChanged event fired",
                  "OnSelChanged", wxOK | wxICON_INFORMATION );
}


I would assume therefore that the printf functions are also working
correctly, but that since the program is started from within windows,
that there is no command line  to display the output. Try starting
your program from within a command line or perhaps you might look into
using a Log output in order to see your error messages.

Best
Mal
On Nov 16, 2007 9:07 AM, zeroDwa <trace02 at wupe.pl> wrote:
>
> Fabian Cenedese pisze:
> > At 07:53 16.11.2007 +0100, zeroDwa wrote:
> >
> >> M Nealon pisze:
> >>> >From what I see, these events are initiated from the contents of the
> >>> tree control. Your tree control has no contents, so why do you expect
> >>> to see the events?
> >> this is only example. Please look at this code:
> >> http://dark-code.bulix.org/wuqcty-61099
> >> (can download http://dark-code.bulix.org/wuqcty-61099?raw)
> >>
> >> I now where is my problem? In constructor is the content.
> >
> > Why don't you compare your program with the wx/samples/treectrl sample?
>
> I compare ;)
> This sample is recode from this code
>
> > This does exactly what you want. Or at least you can copy the part that
> > is used to send out the notification messages for debugging.
>
> no there is no problem. I use Linux printf working propertly but the
> function never run.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wx-users-help at lists.wxwidgets.org
>
>




More information about the wx-users mailing list