tab traversal for widgets placed as children?

Alec Bennett whatyoulookin at yahoo.com
Thu Jan 24 17:27:01 PST 2008


I'm placing two TextCtrl's and a BitmapButton on an image. All works well except the tabbing...
When I tab, it only tabs on the BitmapButton, the TextCtrls are ignored. Is there some way to
enable tab traversing for the TextCtrls?

Here's my code, note that the TextCtrls are placed on self.mainPicture:



class kioskWindowClass(wx.Frame):

    def __init__(self, parent):

        wx.Frame.__init__(self, parent, size=(400,400))

        self.panel = wx.Panel(self)
        
        self.parent = parent

        # Draw the background image
        bmp = wx.Image("webpage_bg.jpg", wx.BITMAP_TYPE_ANY).ConvertToBitmap()
        self.mainPicture = wx.StaticBitmap(self.panel, -1, bmp, pos=(0,0))

        # Text fields placed on the background image
        self.name = wx.TextCtrl(self.mainPicture, -1, "", pos=(50, 150), size = (50, 30))
        self.email = wx.TextCtrl(self.mainPicture, -1, "", pos=(50, 260), size = (50, 30))

        # Submit button:
        bmp = wx.Image("submit.jpg", wx.BITMAP_TYPE_JPEG).ConvertToBitmap()
        selected_bmp = wx.Image("submit_selected.jpg", wx.BITMAP_TYPE_JPEG).ConvertToBitmap()
        self.submitbutton = wx.BitmapButton(self.mainPicture, bitmap=bmp, pos=(50, 320))

        self.Show()








      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 





More information about the wxpython-users mailing list