dabodemo Commit Revision 440 Date: 2006-10-31 13:03:04 -0800 (Tue, 31 Oct 2006) Author: ed
Changed: A trunk/DaboDemo/samples/dBitmapButton.py
Log: Added dBitmapButton demo.
Diff: Added: trunk/DaboDemo/samples/dBitmapButton.py =================================================================== --- trunk/DaboDemo/samples/dBitmapButton.py 2006-10-31 20:05:26 UTC (rev 439) +++ trunk/DaboDemo/samples/dBitmapButton.py 2006-10-31 21:03:04 UTC (rev 440) @@ -0,0 +1,34 @@ +import dabo +dabo.ui.loadUI("wx") +import dabo.dEvents as dEvents +from dabo.dLocalize import _ + + +class TestPanel(dabo.ui.dPanel): + def afterInit(self): + sz = self.Sizer = dabo.ui.dSizer("v", DefaultBorder=20, + DefaultBorderLeft=True) + sz.appendSpacer(25) + + btn = dabo.ui.dBitmapButton(self, Picture="upArrow", DownPicture="browse", + FocusPicture="find", Height=80, Width=80) + btn.bindEvent(dEvents.Hit, self.onButtonHit) + sz.append(btn, halign="center") + sz.appendSpacer(10) + + + def onButtonHit(self, evt): + obj = evt.EventObject + self.Form.logit(_("Button Hit!")) + + +category = "controls.dBitmapButton" + +overview = """ +<p>The <b>dBitmapButton</b> class is used much like the dButton class. The +difference, of course, is that instead of displaying text, it displays an image.</p> + +<p>The <b>Picture</b> property determines the image that is displayed. If you want, you can +also specify a <b>DownPicture</b>, which is displayed when the button is depressed. You +can also specify a <b>FocusPicture</b>, which is displayed when the button has focus.</p> +"""
Property changes on: trunk/DaboDemo/samples/dBitmapButton.py ___________________________________________________________________ Name: svn:eol-style + native
©2006 Ed Leafe |