showmodal result (boa constructor)

Hi there,

I have a dialog with two buttons and a main form
which calls this dialog by using ShowModal
I made these forms / dialogs with Boa Constructor

Now I encountered a problem of how to find out
which button was pressed.

the code in the dialog uses this to create the button id's:

[wxID_DLGPOINTS, wxID_DLGPOINTSBTNCANCEL, wxID_DLGPOINTSBTNOK,
wxID_DLGPOINTSLBPOINTS,
] = map(lambda _init_ctrls: wxNewId(), range(4))

but if I try to use (in the mainform)

result = dlg.ShowModal()
if result == wxID_DLGPOINTSBTNOK the programme complains
that wxID_DLGPOINTSBTNOK is not defined

I tried to use dlg.wxID_DLGPOINTSBTNOK and even
dlg._init_ctrls[2] but without result.

Does anyone know how to handle this procedure with the
Boa generated code? (maybe I have to adjust some kind of
button property?)

Thanks in advance,
Rob van Putten

Hallo,

Where can I find the license documentation for wxPython. I looked in the
wxPython source but could only find wxWindows Library License, Version 3.

Thanks,

Susanne

Never mind, I figured this out...

···

On Tue, 13 May 2003, Susanne Lefvert wrote:

Hallo,

Where can I find the license documentation for wxPython. I looked in the
wxPython source but could only find wxWindows Library License, Version 3.

Thanks,

Susanne

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org

Hi,

Just wanted to let you know my problems with wxTreeCtrl on Windows.

This is what I wanted: 4 headings on the root level with no images that
will have children with images:

+ heading 1
   image child 1
   image child 2
+ heading 2
   image child 1
   image child 2

etc

First, I used the option HIDE_ROOT - no twist buttons showed up.
Then I had a root with no text and no image - twist buttons showed up but
the headings had an ugly indent to make space for an image I didn't want,
which forced me to add an image to each heading item. I got everything
working eventually, but I just wanted to let you know that wxTreeCtrl
works much better on Linux...

/Susanne

Rob van Putten wrote:

Hi there,

I have a dialog with two buttons and a main form
which calls this dialog by using ShowModal
I made these forms / dialogs with Boa Constructor

Now I encountered a problem of how to find out which button was pressed.

the code in the dialog uses this to create the button id's:

[wxID_DLGPOINTS, wxID_DLGPOINTSBTNCANCEL, wxID_DLGPOINTSBTNOK, wxID_DLGPOINTSLBPOINTS, ] = map(lambda _init_ctrls: wxNewId(), range(4))

but if I try to use (in the mainform)

result = dlg.ShowModal()
if result == wxID_DLGPOINTSBTNOK the programme complains
that wxID_DLGPOINTSBTNOK is not defined

I tried to use dlg.wxID_DLGPOINTSBTNOK and even dlg._init_ctrls[2] but without result.

Does anyone know how to handle this procedure with the
Boa generated code? (maybe I have to adjust some kind of
button property?)

If I remember correctly the IDs are at the global scope in the module where they are defined, so it depends on where you are trying to use it, just like any other variable name in Python.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Susanne Lefvert wrote:

Hi,

Just wanted to let you know my problems with wxTreeCtrl on Windows.

This is what I wanted: 4 headings on the root level with no images that will have children with images:

+ heading 1
   image child 1
   image child 2
+ heading 2
   image child 1
   image child 2

etc

First, I used the option HIDE_ROOT - no twist buttons showed up. Then I had a root with no text and no image - twist buttons showed up but the headings had an ugly indent to make space for an image I didn't want, which forced me to add an image to each heading item. I got everything working eventually, but I just wanted to let you know that wxTreeCtrl works much better on Linux...

Yep, the Microsoft widget is a pain in unmentionable places. If you use images anywhere you have to use them everywhere or it looks dorky. I've been thinking about making the wxGenericTreeCtrl (which is what is used on wxGTK and wxMac as wxTreeCtrl) be available in the Win32 version too.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!