1wxStaticText(3)            Erlang Module Definition            wxStaticText(3)
2
3
4

NAME

6       wxStaticText - Functions for wxStaticText class
7

DESCRIPTION

9       A  static  text  control  displays one or more lines of read-only text.
10       wxStaticText supports the three classic text alignments,  label  ellip‐
11       sization  i.e. replacing parts of the text with the ellipsis ("...") if
12       the label doesn't fit into  the  provided  space  and  also  formatting
13       markup with wxControl::SetLabelMarkup() (not implemented in wx).
14
15       Styles
16
17       This class supports the following styles:
18
19       See: wxStaticBitmap, wxStaticBox
20
21       This  class is derived (and can use functions) from: wxControl wxWindow
22       wxEvtHandler
23
24       wxWidgets docs: wxStaticText
25

DATA TYPES

27       wxStaticText() = wx:wx_object()
28

EXPORTS

30       new() -> wxStaticText()
31
32              Default constructor.
33
34       new(Parent, Id, Label) -> wxStaticText()
35
36              Types:
37
38                 Parent = wxWindow:wxWindow()
39                 Id = integer()
40                 Label = unicode:chardata()
41
42       new(Parent, Id, Label, Options :: [Option]) -> wxStaticText()
43
44              Types:
45
46                 Parent = wxWindow:wxWindow()
47                 Id = integer()
48                 Label = unicode:chardata()
49                 Option =
50                     {pos, {X :: integer(), Y :: integer()}} |
51                     {size, {W :: integer(), H :: integer()}} |
52                     {style, integer()}
53
54              Constructor, creating and showing a text control.
55
56              See: create/5
57
58       create(This, Parent, Id, Label) -> boolean()
59
60              Types:
61
62                 This = wxStaticText()
63                 Parent = wxWindow:wxWindow()
64                 Id = integer()
65                 Label = unicode:chardata()
66
67       create(This, Parent, Id, Label, Options :: [Option]) -> boolean()
68
69              Types:
70
71                 This = wxStaticText()
72                 Parent = wxWindow:wxWindow()
73                 Id = integer()
74                 Label = unicode:chardata()
75                 Option =
76                     {pos, {X :: integer(), Y :: integer()}} |
77                     {size, {W :: integer(), H :: integer()}} |
78                     {style, integer()}
79
80              Creation function, for two-step construction.
81
82              For details see new/4.
83
84       getLabel(This) -> unicode:charlist()
85
86              Types:
87
88                 This = wxStaticText()
89
90              Returns the control's label, as it was passed to  wxControl:set‐
91              Label/2.
92
93              Note  that the returned string may contains mnemonics ("&" char‐
94              acters) if they were passed to  the  wxControl:setLabel/2  func‐
95              tion; use GetLabelText() (not implemented in wx) if they are un‐
96              desired.
97
98              Also note that the returned string is always  the  string  which
99              was passed to wxControl:setLabel/2 but may be different from the
100              string passed to SetLabelText() (not implemented in  wx)  (since
101              this last one escapes mnemonic characters).
102
103       setLabel(This, Label) -> ok
104
105              Types:
106
107                 This = wxStaticText()
108                 Label = unicode:chardata()
109
110              Change the label shown in the control.
111
112              Notice  that  since  wxWidgets 3.1.1 this function is guaranteed
113              not to do anything if the label didn't really change,  so  there
114              is no benefit to checking if the new label is different from the
115              current one in the application code.
116
117              See: wxControl:setLabel/2
118
119       wrap(This, Width) -> ok
120
121              Types:
122
123                 This = wxStaticText()
124                 Width = integer()
125
126              This functions wraps the controls label  so  that  each  of  its
127              lines  becomes  at most width pixels wide if possible (the lines
128              are broken at words boundaries so it might not be  the  case  if
129              words are too long).
130
131              If  width is negative, no wrapping is done. Note that this width
132              is not necessarily the total width of the control, since  a  few
133              pixels  for  the border (depending on the controls border style)
134              may be added.
135
136              Since: 2.6.2
137
138       destroy(This :: wxStaticText()) -> ok
139
140              Destroys the object.
141
142
143
144wxWidgets team.                     wx 2.1                     wxStaticText(3)
Impressum