[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnumed-devel] Summary of how to get tabs to work.

From: richard terry
Subject: [Gnumed-devel] Summary of how to get tabs to work.
Date: Thu, 4 Jul 2002 08:58:58 +1000

For anyone dumb like me who has been following this thread here is a summary 
of what I've gleaned/has been contributed, I've tried these things and they 
are true and work as stated
1)For the tabbing to work at all, the window or individual panel you plonk 
controls/wigits on has to have as part of its style flag the following:



class ContactsPanel(wxPanel):
       def __init__(self, parent,id):
          wxPanel.__init__(self, parent, id,

2) The tab order is set by the order you add controls to the panel or frame.

   e.g   self.button1  = wxButton(self,-1,"wxPython sucks sometimes")
           self.button2  = wxButton(self,-1,"depending on your progress") 
           self.button3  = wxButton(self,-1,"and how much help you get") 

          If you run the program the first control to have focus will be the 
first button and hitting the tab key will go to button two, three etc. 
Hitting shift_tab will move you back the other way.

see this ref from Karsten comments from Kevin Atlis author of the award 
winning pythoncard program: Note this was dated end of December 2001, so is 
probably still current:

"The first widget in the list will always be in front of the
second item, which will always be in front of the third item, and so on.
This is the only control we have over tab order and layering that I know of
until more options are added to the underlying capabilities of
Simple eh. Pity the doc's cant put this stuff  somewhere findable. I've 
wasted around 5-6 hours of programming time searching the web, docs, giving 
up in frustration.

Karstens email was invaluable as usual. How the F**** is this project going 
to get anywhere if it's so bloody hard to glean the basics of a language.  
If you think I'm feeling pissed off today, you just about got it right

Is there anyone else on this list who really wants to learn but is put off by 
the difficulty. If so, mail me and I'll start a mini- wxPython class with my 
meagre hard won knowledge. If Karsten/Horst then care to edit the files they 
can point out better ways of doing things.

If we had 10 code cutters instead of Karsten, Ian, and Horst, with me 
bringing up a lame third struggling to get going, then we might just get 

A special thanks Karsten, as usual I'm indebted to your simple gems and 
willingness to help me learn.  

Horst thanks for your email, but can I emphasis once again that for dummies 
like me I need a few lines of actual code as an example, then it will sink 
in. Unfortunately I'm a visual person. I'm learning this programming to try 
and help the project with the gui, I'm not a logical thinker when it comes to 
the language. I found VB easy, cause it did what you intuitively would do, so 
I could write code by the ream straight off the keyboard. Wheras once I'm 
starting to learn python, I can now do that relatively easily with the gui 
stuff, it takes time to learn.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]