wxPython Merge #2 of 2.4 branch --> HEAD (branch tag: wxPy_2_4_merge_2)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21593 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2003-07-02 23:13:10 +00:00
parent e234d4c9b7
commit 1fded56b37
535 changed files with 48899 additions and 20067 deletions

View File

@@ -24,7 +24,7 @@ class TestPanel(wxPanel):
row = wxBoxSizer(wxHORIZONTAL)
row.Add(s1, 0, wxALL, 5)
row.Add(self.lb1, 0, wxALL, 5)
row.Add(self.txt, 0, wxALL, 5)
row.Add(self.txt, 0, wxALL|wxADJUST_MINSIZE, 5)
sizer = wxBoxSizer(wxVERTICAL)
sizer.Add(row, 0, wxALL, 30)
@@ -32,13 +32,27 @@ class TestPanel(wxPanel):
self.Layout()
self.lb1.SetSelection(0)
self.OnSelect(None)
wxFutureCall(300, self.SetTextSize)
def SetTextSize(self):
self.txt.SetSize(self.txt.GetBestSize())
def OnSelect(self, evt):
#print "OnSelect: "
face = self.lb1.GetStringSelection()
#print '\t '+face
font = wxFont(28, wxDEFAULT, wxNORMAL, wxNORMAL, False, face)
#print "\t got font"
self.txt.SetLabel(face)
#print "\t set label"
self.txt.SetFont(font)
self.txt.SetSize(self.txt.GetBestSize())
#print "\t set font"
#self.txt.SetSize(self.txt.GetBestSize())
#print "\t set size"
## st = font.GetNativeFontInfo().ToString()
## ni2 = wxNativeFontInfo()