Re: pyLbc: very confused!

  • From: Jamal Mazrui <empower@xxxxxxxxx>
  • To: Alex Hall <mehgcap@xxxxxxxxx>
  • Date: Mon, 31 May 2010 08:43:15 -0400

wxPython should ensure that there is a single wxApp instance. lbc creates dialogs (either modal or modeless) with the wxDialog class, but not the wxFrame class. I have not built an app with wxFrame as yet, so you may be exploring new territory to some extent. Besides looking at the fruit basket example, look at the routines in You might also check out the source code of McTwit, which uses lbc

or .zip.

Using lbc successfully does require wxPython knowledge as well. lbc provides convenient wrappers, but if you are using it for more than the canned dialogs, then you would need to make use of the methods available for each widget. A collection of text tutorials on wxWidgets is at

Sorry I can't be more help than this. If you develop refinements to PyLbc, please share them.


On 5/30/2010 11:59 PM, Alex Hall wrote:
Yes, I think I see most of it; I am not experienced enough in wx to
get it all, but I think I have the most important parts.
I have my wx frame created, and am opening dialogs using lbc on top of
my frame. I am suddenly getting strange problems with my frame not
closing with alt-f4, sometimes, and needing to hit ctrl-c in the shell
from where I opened my program to kill the process completely, even
when alt-f4 does work. I am telling my dialog
"parent=board.parentFrame", where board.parentFrame is the frame I am
using, but nothing improves. Are the two instances of wx.App not
getting along? If so, what should I do to get lbc dialogs to play nice
with my own wx frame, which is already there and set up with controls
and an accelerator table?

On 5/30/10, Jamal Mazrui<empower@xxxxxxxxx>  wrote:
Please look closely at the example.  It shows how to get
the value of an edit box and listbox.  It also shows how to complete a
dialog with the ShowModal method.


On 5/30/2010 8:17 PM, Alex Hall wrote:
Hello all,
I am starting to use pyLbc. It looks perfect for what I am doing, but
I have two rather large problems: first, my dialog is not showing my
controls, and second, I cannot figure out how to get values from it
once it does show up. Here is my code, called from inside a function:
   dlg=lbc.Dialog(title="Launch Harpoon missile")
   dlg.AddListBox(label="Select impact pattern:", names="cross pattern|x
pattern", values=0|1)
   dlg.AddTextCtrl(label="Center coordinates for missile strike:",

All I get is a dialog with title "ShowDialog" and an OK button; no
listbox, no input box. Once I get this working, how do I retrieve the
value of the input box and the value of the selected item in my
listbox to give to the function that created the dialog? TIA!

View the list's information and change your settings at

Other related posts: