[wxpython-users] Trouble with advanced gui
AK
andrei.avk at gmail.com
Mon Mar 24 14:11:41 PDT 2008
David Anderson wrote:
> I'm tryning to have a gui that looks like this
> _________________________________________________
> menu1 | menu 2 | menu 3
> _________________________________________________
> |object containing those objects>> |list of objects.__str__ |
> |here will show the __str__ of the |that will drag here and |
> |object, draggin and droppin |drop there<<< |
> |the user cannot modify this sector| |
> |except by draging and dropping |___________________ |
> | |button 1
> |
> | |button
> 2 |
> | |button
> 3 |
> |____________________________ |button 4 ____________|
>
> wht's is the best way to do something like this? I'm kinda new on wx,
> only now few about labels buttons, events and little bit about
> containers and frames, and can make some dialogs, forms and simple
> apps Any reply will be helpful
> Thankx
Well, menu can be done like this:
# File Menu
menu = wx.Menu()
menu_list = menu.Append(ID_LIST, "&Apply Filters\tCtrl-L",
"Apply currently selected filters")
wx.EVT_MENU(self, ID_LIST, self.list)
... add more menus ...
add all menus to bar:
menuBar = wx.MenuBar()
menuBar.Append(menu, "&File")
Splitter can be done like this:
self.splitter = wx.SplitterWindow(self, id=-1,
pos=wx.DefaultPosition,
size=wx.DefaultSize, name="splitterWindow")
# size=wx.DefaultSize, style=wx.SP_3D, name="splitterWindow")
# make it do nothing because by default it will close one splitter side!!
self.Bind(wx.EVT_SPLITTER_DCLICK, self.OnSplitterDclick)
self.tpanel = wx.Panel(self.splitter, -1,
style=wx.SUNKEN_BORDER) # top panel
bpanel = wx.Panel(self.splitter, -1,
style=wx.SUNKEN_BORDER) # bottom panel
And put your text controls, buttons, etc in these panels.. also you will
want to put another splitter
in the right half of screen and put 2 panels on top and bottom.. HTH, -ak
> ------------------------------------------------------------------------
>
> _______________________________________________
> wxpython-users mailing list
> wxpython-users at lists.wxwidgets.org
> http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
>
--
-ak
Tobu | http://www.lightbird.net/tobu/ | Freeform DB / Tagger / PIM
More information about the wxpython-users
mailing list