Centering text in a wx.ListBox w/ wxPython

2005-06-26 Thread fooooo
How do I center each item in the ListBox widget?
Also, is it possible to change the color of the selected item? right
now it uses the OSes color. I would like it to be consistant on every
machine.

-- 
http://mail.python.org/mailman/listinfo/python-list


Multiple threads in a GUI app (wxPython), communication between worker thread and app?

2005-05-01 Thread fooooo
This is a network app, written in wxPython and the socket module. This
is what I want to happen:

GUI app starts. User clicks a button to 'start' the work of the app.
When start is pressed, a new thread is spawned (threading module) and
this thread starts listening for data on a socket. When someone
connects, a new thread is spawned, It needs to do I/O on that socket
and open a GUI window so the user can communicate with the client
(socket) that just connected. Any further data that comes in on that
socket should be redirected to the newly opened GUI window. Any more
connection attempts will open a new GUI window and the same cycle
repeats.

How would I get the worker thread to open a GUI window in the main GUI
thread? After that GUI window is open, how can I send and recv messages
from/to the GUI window?

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Multiple threads in a GUI app (wxPython), communication between worker thread and app?

2005-05-02 Thread fooooo
Thanks for the replies. I have a Queue object in the main GUI thread,
this gets passed to all the worker threads and they add items to it.
This is all well and good, but what is a good way to get the GUI thread
to send items back to the worker threads?

-- 
http://mail.python.org/mailman/listinfo/python-list