[wxPython] Button don't push

Hi!, there

I show a button in my frame, but it doesn't push happens when I click on
it.

In: NT 4.0 SP3 || wxPython 2.1.15 || Python 1.5

the code in __init__

...
b = wxButton(self,101, "A real button", (10,10))
EVT_BUTTON(self, 101, self.OnButton)
...

thanks in advance!

pablo

Hi!, there

I show a button in my frame, but it doesn't push happens when I click on
it.

In: NT 4.0 SP3 || wxPython 2.1.15 || Python 1.5

the code in __init__

...
b = wxButton(self,101, "A real button", (10,10))
EVT_BUTTON(self, 101, self.OnButton)
...

thanks in advance!

pablo

You should write funtion OnButton to get respond from button event. Add this
code below your EVT_BUTTON

def OnButton(self,event):
    dlg=wxMessageDialog(NULL,'Hello World','Dialog',wxOK |
wxICON_INFORMATION)
    dlg.ShowModal()
    dlg.Destroy()

You should write funtion OnButton to get respond from button event. Add this
code below your EVT_BUTTON

def OnButton(self,event):
    dlg=wxMessageDialog(NULL,'Hello World','Dialog',wxOK |
wxICON_INFORMATION)
    dlg.ShowModal()
    dlg.Destroy()

Thanks a lot for your response!

But the problem is that the button appears as a bitmap. No response when
I click on it. It doesn't get low and raise when I de-click. I've got a
menu in the program but it drop when I click on it, so the problem is
only in the button.

Pablo.

Sorry

I've discovered my mistake:

Instead of:
    b = wxButton(self, 201, "A real button", (10,10)) #self in 1st.
parameter
    EVT_BUTTON(self, 201, self.OnButton)

Is:

    b = wxButton(panel, 201, "A real button", (10,10)) #panel in 1st.
parameter
    EVT_BUTTON(self, 201, self.OnButton)

I wonder if it's panel who sends messages to the button instead frame.
Anyrod, I can follow implementing my Complete Suite for Enterprises'
Solution (just a joke ;))

Thanks everybody there

Pablo.