It's exactly what I needed, thank you very much. El 25/02/2012 12:48 p.m., Ed Leafe escribió: > On Feb 24, 2012, at 4:19 PM, STyler wrote: > >> Hi all, I'm new to python, I come from VFP, I would like to give me an >> example of using dSplitter class, I was seeing use in DEMO but uses a >> "cdxml" would like for python code. > > I've included a very simple sample program after my signature. I hope > that it helps explain what you need. If not, please post any questions here > and we'll be glad to answer them. > > > -- Ed Leafe > > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > > !/usr/bin/env python > # -*- coding: utf-8 -*- > import dabo > dabo.ui.loadUI("wx") > > > class SampleForm(dabo.ui.dForm): > def afterInit(self): > # Create two panels, and make each 50% of the form > self.topPanel = dabo.ui.dPanel(self) > self.bottomPanel = dabo.ui.dPanel(self) > self.topPanel.Sizer = dabo.ui.dSizerH() > self.bottomPanel.Sizer = dabo.ui.dSizerH() > self.Sizer.append(self.topPanel, "x", 1) > self.Sizer.append(self.bottomPanel, "x", 3) > # Now add a splitter to the bottom panel > self.splitter = dabo.ui.dSplitter(self.bottomPanel, Orientation="V", > createPanes=True) > self.splitter.Panel1.BackColor = "green" > self.splitter.Panel2.BackColor = "red" > self.bottomPanel.Sizer.append1x(self.splitter) > # Create a button that will toggle the status of the splitter > btn = dabo.ui.dButton(self.topPanel, Caption="Toggle", > OnHit=self.onToggleSplitter) > self.topPanel.Sizer.append(btn, border=20) > > > def onToggleSplitter(self, evt): > self.splitter.toggleSplit() > > > if __name__ == "__main__": > app = dabo.dApp(MainFormClass=SampleForm) > app.start() > >
_______________________________________________ Post Messages to: Dabo-users@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/jihene$nu3$1...@dough.gmane.org