mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-06 12:00:13 +01:00
Add a few richtextctrl tests
This commit is contained in:
@@ -25,16 +25,57 @@ class richtextctrl_Tests(wtc.WidgetTestCase):
|
||||
|
||||
|
||||
def test_richtextctrl3(self):
|
||||
pass
|
||||
rtc = wx.richtext.RichTextCtrl(self.frame)
|
||||
|
||||
|
||||
def test_richtextctrl4(self):
|
||||
pass
|
||||
rtc = wx.richtext.RichTextCtrl()
|
||||
rtc.Create(self.frame)
|
||||
|
||||
|
||||
def test_richtextctrl5(self):
|
||||
pass
|
||||
rtc = wx.richtext.RichTextCtrl(self.frame)
|
||||
|
||||
rtc.SetValue('Hello World')
|
||||
self.assertEqual('Hello World', rtc.GetValue())
|
||||
self.assertEqual('Hello World', rtc.Value)
|
||||
|
||||
|
||||
def test_richtextctrl6(self):
|
||||
pass
|
||||
rtc = wx.richtext.RichTextCtrl(self.frame)
|
||||
rtc.SetValue('Hello World')
|
||||
|
||||
rtc.SetSelection(2, 6)
|
||||
sel = rtc.GetSelection()
|
||||
self.assertIsInstance(sel, wx.richtext.RichTextSelection)
|
||||
selrange = sel.GetRange(0)
|
||||
self.assertIsInstance(selrange, wx.richtext.RichTextRange)
|
||||
start = selrange.Start
|
||||
end = start + selrange.Length
|
||||
self.assertEqual((start,end), (2,6))
|
||||
|
||||
|
||||
def test_richtextctrl7(self):
|
||||
wx.richtext.EVT_RICHTEXT_LEFT_CLICK
|
||||
wx.richtext.EVT_RICHTEXT_RIGHT_CLICK
|
||||
wx.richtext.EVT_RICHTEXT_MIDDLE_CLICK
|
||||
wx.richtext.EVT_RICHTEXT_LEFT_DCLICK
|
||||
wx.richtext.EVT_RICHTEXT_RETURN
|
||||
wx.richtext.EVT_RICHTEXT_CHARACTER
|
||||
wx.richtext.EVT_RICHTEXT_DELETE
|
||||
wx.richtext.EVT_RICHTEXT_STYLESHEET_CHANGING
|
||||
wx.richtext.EVT_RICHTEXT_STYLESHEET_CHANGED
|
||||
wx.richtext.EVT_RICHTEXT_STYLESHEET_REPLACING
|
||||
wx.richtext.EVT_RICHTEXT_STYLESHEET_REPLACED
|
||||
wx.richtext.EVT_RICHTEXT_CONTENT_INSERTED
|
||||
wx.richtext.EVT_RICHTEXT_CONTENT_DELETED
|
||||
wx.richtext.EVT_RICHTEXT_STYLE_CHANGED
|
||||
wx.richtext.EVT_RICHTEXT_STYLE_CHANGED
|
||||
wx.richtext.EVT_RICHTEXT_SELECTION_CHANGED
|
||||
wx.richtext.EVT_RICHTEXT_BUFFER_RESET
|
||||
wx.richtext.EVT_RICHTEXT_FOCUS_OBJECT_CHANGED
|
||||
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user