File: test_textctrl.py

package info (click to toggle)
wxpython4.0 4.2.3%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 221,752 kB
  • sloc: cpp: 962,555; python: 230,573; ansic: 170,731; makefile: 51,756; sh: 9,342; perl: 1,564; javascript: 584; php: 326; xml: 200
file content (105 lines) | stat: -rw-r--r-- 2,476 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
import unittest
from unittests import wtc
import wx

#---------------------------------------------------------------------------

class textctrl_Tests(wtc.WidgetTestCase):

    def test_textctrlFlags(self):
        wx.TE_NO_VSCROLL
        wx.TE_READONLY
        wx.TE_MULTILINE
        wx.TE_PROCESS_TAB
        wx.TE_LEFT
        wx.TE_CENTER
        wx.TE_RIGHT
        wx.TE_CENTRE
        wx.TE_RICH
        wx.TE_PROCESS_ENTER
        wx.TE_PASSWORD
        wx.TE_AUTO_URL
        wx.TE_NOHIDESEL
        wx.TE_DONTWRAP
        wx.TE_CHARWRAP
        wx.TE_WORDWRAP
        wx.TE_BESTWRAP


    def test_textctrlCtor(self):
        t = wx.TextCtrl(self.frame)
        t = wx.TextCtrl(self.frame, -1, "Hello")
        t = wx.TextCtrl(self.frame, style=wx.TE_READONLY)
        t = wx.TextCtrl(self.frame, style=wx.TE_PASSWORD)
        t = wx.TextCtrl(self.frame, style=wx.TE_MULTILINE)


    def test_textctrlDefaultCtor(self):
        t = wx.TextCtrl()
        t.Create(self.frame)


    def test_textctrlProperties(self):
        t = wx.TextCtrl(self.frame)

        t.DefaultStyle
        t.NumberOfLines
        t.Hint
        t.InsertionPoint
        t.LastPosition
        t.Margins
        t.StringSelection
        t.Value


    def test_textctrlTextAttr(self):
        ta = wx.TextAttr()
        ta2 = wx.TextAttr(ta)
        ta3 = wx.TextAttr('black', 'white', wx.NORMAL_FONT, wx.TEXT_ALIGNMENT_RIGHT)

    def test_textctrlTextAttrProperties(self):
        ta = wx.TextAttr()

        ta.Alignment
        ta.BackgroundColour
        ta.BulletFont
        ta.BulletName
        ta.BulletNumber
        ta.BulletStyle
        ta.BulletText
        ta.CharacterStyleName
        ta.Flags
        ta.Font
        ta.FontEncoding
        ta.FontFaceName
        ta.FontFamily
        ta.FontSize
        ta.FontStyle
        ta.FontUnderlined
        ta.FontWeight
        ta.LeftIndent
        ta.LeftSubIndent
        ta.LineSpacing
        ta.ListStyleName
        ta.OutlineLevel
        ta.ParagraphSpacingAfter
        ta.ParagraphSpacingBefore
        ta.ParagraphStyleName
        ta.RightIndent
        ta.Tabs
        ta.TextColour
        ta.TextEffectFlags
        ta.TextEffects
        ta.URL


    def test_textctrlNativeCaret(self):
        t = wx.TextCtrl(self.frame)
        t.ShowNativeCaret
        t.HideNativeCaret

#---------------------------------------------------------------------------


if __name__ == '__main__':
    unittest.main()