WriteText test case
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17250 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -43,6 +43,8 @@ class TestPanel(wxPanel):
|
||||
EVT_BUTTON(self, b.GetId(), self.OnTestReplace)
|
||||
b2 = wxButton(self, -1, "Test GetSelection")
|
||||
EVT_BUTTON(self, b2.GetId(), self.OnTestGetSelection)
|
||||
b3 = wxButton(self, -1, "Test WriteText")
|
||||
EVT_BUTTON(self, b3.GetId(), self.OnTestWriteText)
|
||||
self.tc = t3
|
||||
|
||||
l4 = wxStaticText(self, -1, "Rich Text")
|
||||
@@ -58,6 +60,7 @@ class TestPanel(wxPanel):
|
||||
bsizer = wxBoxSizer(wxVERTICAL)
|
||||
bsizer.Add(b, 0, wxGROW)
|
||||
bsizer.Add(b2, 0, wxGROW)
|
||||
bsizer.Add(b3, 0, wxGROW)
|
||||
|
||||
sizer = wxFlexGridSizer(cols=3, hgap=6, vgap=6)
|
||||
sizer.AddMany([ l1, t1, (0,0),
|
||||
@@ -84,6 +87,9 @@ class TestPanel(wxPanel):
|
||||
self.tc.Replace(5, 9, "IS A")
|
||||
#self.tc.Remove(5, 9)
|
||||
|
||||
def OnTestWriteText(self, evt):
|
||||
self.tc.WriteText("TEXT")
|
||||
|
||||
def OnTestGetSelection(self, evt):
|
||||
start, end = self.tc.GetSelection()
|
||||
text = self.tc.GetValue()
|
||||
|
Reference in New Issue
Block a user