[Commits] (davids) colheader - demo - added selection draw control
commits at osafoundation.org
commits at osafoundation.org
Mon Apr 11 02:33:29 PDT 2005
Commit by: davids
Modified files:
internal/wxPython-2.5/wxPython/demo/ColumnHeader.py 1.21 1.22
Log message:
colheader - demo - added selection draw control
r=TBD
ViewCVS links:
http://cvs.osafoundation.org/index.cgi/internal/wxPython-2.5/wxPython/demo/ColumnHeader.py.diff?r1=text&tr1=1.21&r2=text&tr2=1.22
Index: internal/wxPython-2.5/wxPython/demo/ColumnHeader.py
diff -u internal/wxPython-2.5/wxPython/demo/ColumnHeader.py:1.21 internal/wxPython-2.5/wxPython/demo/ColumnHeader.py:1.22
--- internal/wxPython-2.5/wxPython/demo/ColumnHeader.py:1.21 Sun Apr 10 01:01:40 2005
+++ internal/wxPython-2.5/wxPython/demo/ColumnHeader.py Mon Apr 11 02:33:27 2005
@@ -79,6 +79,12 @@
btn = wx.Button( self, -1, "Resize Bounds", (self.colStartX, miscControlsY + 30) )
self.Bind( wx.EVT_BUTTON, self.OnButtonTestResizeBounds, btn )
+ styleList = ['None', 'Native', 'BoldLabel', 'Grey', 'InvertBevel', 'Underline', 'Overline', 'Frame', 'Bullet']
+ wx.StaticText( self, -1, "Selection Style:", (self.colStartX, miscControlsY + 75), (150, -1) )
+ choice = wx.Choice( self, -1, (self.colStartX, miscControlsY + 95), choices = styleList )
+ choice.SetSelection( 1 )
+ self.Bind( wx.EVT_CHOICE, self.OnEvtChoice, choice )
+
self.colStartX += 150
cb1 = wx.CheckBox( self, -1, "Enable", (self.colStartX, miscControlsY), (100, 20), wx.NO_BORDER )
@@ -179,6 +185,12 @@
self.ch2.SetFlagProportionalResizing( curEnabled )
self.l0.SetLabel( "proportional resizing (%d)" %(curEnabled) )
+ def OnEvtChoice( self, event ):
+ ch = event.GetEventObject()
+ self.ch1.SetSelectionDrawStyle( event.GetSelection() )
+ self.ch2.SetSelectionDrawStyle( event.GetSelection() )
+ self.l0.SetLabel( "Choice hit (%d - %s)" %(event.GetSelection(), event.GetString()) )
+
#----------------------------------------------------------------------
def runTest( frame, nb, log ):
More information about the Commits
mailing list