I thought I should pop up a slightly old thread for this problem I'm having.

I started *trying* to use wxWidgets.
IT makes sense... a little bit.

But there is one roadblock in my way of progressing in a program I am trying to get done.

Basically, I want to be able to click a button (In this case, "Button2"), so that the text changes. I can do that fine. But I then want to be able to click it again so that it changes to something new.


I have tried countless different possible ways of what I thought would work, but I just can't get it.

This was my last attempt (The bit I'm at a problem with):

Code:
void Physics_StudyFrame::OnButton2Click(wxCommandEvent& event)
{
    for (int a=0; a<2; a++)
    {
        (StaticText2)->SetLabel(_("FirstClick new Text"));
        a = a + 1;
    }

}


void Physics_StudyFrame::OnButton2Click2(wxCommandEvent& event)
{
    (StaticText2)->SetLabel(_("Second Click New Text"));
}

I dunno, In my head it seems that should work. But it just doesn't.

I thought about possibly making the button disappear on first click and then a new one re-appear, so that for the second click I could just use the new button. But... I don't even know where to begin for that one

Halp