[wxpython-users] Trouble with advanced gui
David Anderson
zerty.david at gmail.com
Mon Mar 24 13:56:28 PDT 2008
Well. I made my SplitPannel
def OnNovo(self, evt):
self.splitter =3D wx.SplitterWindow(self, id=3D-1, pos=3D
wx.DefaultPosition,
size=3Dwx.DefaultSize, name=3D"Sp=
lit",
style=3Dwx.SP_3D)
self.Bind(wx.EVT_SPLITTER_DCLICK, self.OnSplitterDclick)
self.tpanel =3D wx.Panel(self.splitter, -1,style=3Dwx.SUNKEN_BORDER)
# top panel
self.bpanel =3D wx.Panel(self.splitter, -1,style=3Dwx.SUNKEN_BORDER)
# bottom panel
addErro =3D wx.Button(self.bpanel, ADD_ERRO, 'Adiciona Erro')
criaErro =3D wx.Button(self.bpanel, CRIA_ERRO, 'Criar erro')
criaDupla =3D wx.Button(self.bpanel, CRIA_DUPLA, 'Criar dupla')
geraHtml =3D wx.Button(self.bpanel, GERA_HTML, 'Gerar Html')
botoes =3D wx.BoxSizer(wx.VERTICAL)
botoes.Add(addErro)
botoes.Add(criaErro)
botoes.Add(criaDupla)
botoes.Add(geraHtml)
self.Bind(wx.EVT_BUTTON, self.onAddErro, id=3DADD_ERRO)
self.Bind(wx.EVT_BUTTON, self.onCriaErro, id=3DCRIA_ERRO)
self.Bind(wx.EVT_BUTTON, self.onCriaDupla, id=3DCRIA_DUPLA)
self.Bind(wx.EVT_BUTTON, self.onGeraHtml, id=3DGERA_HTML)
self.bpanel.SetSizer(botoes)
And when it's supposed to show the splitpane, it only appears a small square
at the left corner of the frame...
can anyone see the problem?
thx
On Mon, Mar 24, 2008 at 6:37 PM, AK <andrei.avk at gmail.com> wrote:
> David Anderson wrote:
> > I Know how to make the menus, thankx for the split panel, but what
> > about the txtctrl on the left and the drag and drop stuff?
> There is example of drag and drop with demo, (draganddrop.py), the
> textctrl on the left you just make a regular one and use
> a read only style, and drag and drop will set contents.. on the right,
> you'll want a listctrl but I'm not sure how to do drag and
> drop of listctrl items. Maybe someone else can help. Look through the
> demo though, maybe it has notes or comments on that,
> too. -ak
> >
> > On Mon, Mar 24, 2008 at 6:11 PM, AK <andrei.avk at gmail.com
> > <mailto:andrei.avk at gmail.com>> wrote:
> >
> > 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 =3D wx.Menu()
> > menu_list =3D 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 =3D wx.MenuBar()
> > menuBar.Append(menu, "&File")
> >
> > Splitter can be done like this:
> >
> > self.splitter =3D wx.SplitterWindow(self, id=3D-1,
> > pos=3Dwx.DefaultPosition,
> > size=3Dwx.DefaultSize, name=3D"splitterWindow")
> > # size=3Dwx.DefaultSize, style=3Dwx.SP_3D,
> > name=3D"splitterWindow")
> >
> > # make it do nothing because by default it will close one splitter
> > side!!
> > self.Bind(wx.EVT_SPLITTER_DCLICK, self.OnSplitterDclick)
> >
> > self.tpanel =3D wx.Panel(self.splitter, -1,
> > style=3Dwx.SUNKEN_BORDER) # top panel
> > bpanel =3D wx.Panel(self.splitter, -1,
> > style=3Dwx.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
> > <mailto: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
> >
> > _______________________________________________
> > wxpython-users mailing list
> > wxpython-users at lists.wxwidgets.org
> > <mailto:wxpython-users at lists.wxwidgets.org>
> > http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > 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
>
> _______________________________________________
> wxpython-users mailing list
> wxpython-users at lists.wxwidgets.org
> http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200803=
24/4e61cd17/attachment-0001.htm
More information about the wxpython-users
mailing list