ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> wxpython-users
wxpython-users
[wxpython-users] newbie with questions
by Tim Mortimer other posts by this author
May 9 2008 4:09AM messages near this date
Re: [wxpython-users] ESC not working on XP | Re: [wxpython-users] newbie with questions
{Sorry Folks - Attempting to resend my first post - as Plain Text:}

Hello,

I am new to wxPython, & it's the first GUI tool i've ever used.

I started teaching myself Python circa June 2007, primarily to work with 
Csound to make "ambient", "experimental", &/or "generative" types of music.

I now wish to use wxPython to start developing some front ends for my ideas.

I have the "wx In Action" book & i have found it very helpful. Thank you 
to the authors.

I have also been poking around with wxGlade over the last couple of days.

I have some questions that haven't been answered through using the wx In 
Action book, & also as a result of looking through the wxPython demo 
application.

Primarily they are

1) How can i add more than one Grid into a split wxFrame?

wxGlade allows me to do so, & publishes a preview ok. However the 
example of this (admittedly with only 1 Grid, but the principle is the 
same) i have attached won't run as a standalone script on my windows XP 
machine.

It's the whole attaching Grid to a host Frame as "self" thing (see line 
22 of the example code)... how can this be done (if wxGlade can preview 
it ok, then surely somehow it is possible?)

2) I'm a little nervous because in the wxPython demo app for Grid it says

"This demo shows various ways of using the new and improved wx.Grid 
class. Unfortunatly it has not been documented yet, and while it is 
somewhat backwards compatible, if you try to go by the current wx.Grid 
documentation you will probably just confuse yourself. "

Assumedly then this is also true vis a vis the information in the wx In 
Action book then also?

What's a generally befuddled novitiate like me therefore to do? Most of 
what i have tried with the Grid by way of existing examples seems to 
work after all...

3) Can someone show me in a general way (or link me appropriately, this 
must be asked all the time...) how to conditionally redraw & refresh the 
interface with widgets?

For example, lets say i have a list box, with available selections 
1,2,3, or 4

The selection is evaluated, & based on this i'd like to repopulate the 
Panel & have that many checkboxes (for example) displayed

I actually want to take this one step further & define my own custom row 
of checkboxes (assumedly as a Class "MyCustomCheckList")

x   x   x   x   x   x   x

& then populate the screen with this many rows of the CustomCheckList

eg:

selection : 3

display:

x   x   x   x   x   x   x
x   x   x   x   x   x   x
x   x   x   x   x   x   x

(3 rows of CustomCheckList objects)

I'm sure some simple "for n in range(selection)" type statements can 
deliver the goods, but is there any special threading or refresh display 
calls required to redraw the GUI to the screen?

Of course, if I can get more than one Grid into a split frame, then I 
can assumedly just re-label (&/or reformat) the rows of the grid to 
reflect "this row active", & use checkboxes as cell types to get the 
same overall effect. But then we are back to point 1) above

Im looking forward to getting my hands dirty, & i'd welcome any 
assistance to hit the ground running.

cheers

Tim (Adelaide, Australia - if you are local & keen to chat Python &/or 
wx please get in touch!)
Thread:
Tim Mortimer
Robin Dunn
Gre7g Luterman

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved