Merged wxPython 2.4.x to the 2.5 branch (Finally!!!)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19793 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2003-03-25 06:35:27 +00:00
parent 9b4e3f352b
commit 1e4a197e4c
586 changed files with 62691 additions and 17740 deletions

View File

@@ -16,7 +16,6 @@
"""
from wxPython.wx import *
import string
#----------------------------------------------------------------------
@@ -65,6 +64,8 @@ class wxGenStaticText(wxPyControl):
style = self.GetWindowStyleFlag()
if not style & wxST_NO_AUTORESIZE:
self.SetSize(self.GetBestSize())
self.Refresh()
def SetFont(self, font):
"""
@@ -75,6 +76,7 @@ class wxGenStaticText(wxPyControl):
style = self.GetWindowStyleFlag()
if not style & wxST_NO_AUTORESIZE:
self.SetSize(self.GetBestSize())
self.Refresh()
def DoGetBestSize(self):
@@ -94,13 +96,17 @@ class wxGenStaticText(wxPyControl):
def AcceptsFocus(self):
"""Overridden base class virtual."""
return false
return False
def OnPaint(self, event):
width, height = self.GetClientSize()
dc = wxBufferedPaintDC(self)
#dc = wxPaintDC(self)
width, height = self.GetClientSize()
if not width or not height:
return
dc.SetBackground(wxBrush(self.GetBackgroundColour(), wxSOLID))
dc.SetTextForeground(self.GetForegroundColour())
dc.Clear()
dc.SetFont(self.GetFont())
label = self.GetLabel()