1wxNotebook(3) Erlang Module Definition wxNotebook(3)
2
3
4
6 wxNotebook - Functions for wxNotebook class
7
9 This class represents a notebook control, which manages multiple win‐
10 dows with associated tabs.
11
12 To use the class, create a wxNotebook object and call wxBookCtrl‐
13 Base:addPage/4 or wxBookCtrlBase:insertPage/5, passing a window to be
14 used as the page. Do not explicitly delete the window for a page that
15 is currently managed by wxNotebook.
16
17 wxNotebookPage is a typedef for wxWindow.
18
19 Styles
20
21 This class supports the following styles:
22
23 Page backgrounds
24
25 On Windows, the default theme paints a background on the notebook's
26 pages. If you wish to suppress this theme, for aesthetic or performance
27 reasons, there are three ways of doing it. You can use wxNB_NOPAGETHEME
28 to disable themed drawing for a particular notebook, you can call
29 wxSystemOptions:setOption/2 to disable it for the whole application, or
30 you can disable it for individual pages by using wxWindow:setBack‐
31 groundColour/2.
32
33 To disable themed pages globally:
34
35 Set the value to 1 to enable it again. To give a single page a solid
36 background that more or less fits in with the overall theme, use:
37
38 On platforms other than Windows, or if the application is not using
39 Windows themes, getThemeBackgroundColour/1 will return an uninitialised
40 colour object, and the above code will therefore work on all platforms.
41
42 See: ?wxBookCtrl, wxBookCtrlEvent, wxImageList, Examples
43
44 This class is derived (and can use functions) from: wxBookCtrlBase wx‐
45 Control wxWindow wxEvtHandler
46
47 wxWidgets docs: wxNotebook
48
50 Event types emitted from this class: command_notebook_page_changed,
51 command_notebook_page_changing
52
54 wxNotebook() = wx:wx_object()
55
57 new() -> wxNotebook()
58
59 Constructs a notebook control.
60
61 new(Parent, Id) -> wxNotebook()
62
63 Types:
64
65 Parent = wxWindow:wxWindow()
66 Id = integer()
67
68 new(Parent, Id, Options :: [Option]) -> wxNotebook()
69
70 Types:
71
72 Parent = wxWindow:wxWindow()
73 Id = integer()
74 Option =
75 {pos, {X :: integer(), Y :: integer()}} |
76 {size, {W :: integer(), H :: integer()}} |
77 {style, integer()}
78
79 Constructs a notebook control.
80
81 Note that sometimes you can reduce flicker by passing the wx‐
82 CLIP_CHILDREN window style.
83
84 destroy(This :: wxNotebook()) -> ok
85
86 Destroys the wxNotebook object.
87
88 assignImageList(This, ImageList) -> ok
89
90 Types:
91
92 This = wxNotebook()
93 ImageList = wxImageList:wxImageList()
94
95 Sets the image list for the page control and takes ownership of
96 the list.
97
98 See: wxImageList, setImageList/2
99
100 create(This, Parent, Id) -> boolean()
101
102 Types:
103
104 This = wxNotebook()
105 Parent = wxWindow:wxWindow()
106 Id = integer()
107
108 create(This, Parent, Id, Options :: [Option]) -> boolean()
109
110 Types:
111
112 This = wxNotebook()
113 Parent = wxWindow:wxWindow()
114 Id = integer()
115 Option =
116 {pos, {X :: integer(), Y :: integer()}} |
117 {size, {W :: integer(), H :: integer()}} |
118 {style, integer()}
119
120 Creates a notebook control.
121
122 See new/3 for a description of the parameters.
123
124 getImageList(This) -> wxImageList:wxImageList()
125
126 Types:
127
128 This = wxNotebook()
129
130 Returns the associated image list, may be NULL.
131
132 See: wxImageList, setImageList/2
133
134 getPageImage(This, NPage) -> integer()
135
136 Types:
137
138 This = wxNotebook()
139 NPage = integer()
140
141 Returns the image index for the given page.
142
143 getRowCount(This) -> integer()
144
145 Types:
146
147 This = wxNotebook()
148
149 Returns the number of rows in the notebook control.
150
151 getThemeBackgroundColour(This) -> wx:wx_colour4()
152
153 Types:
154
155 This = wxNotebook()
156
157 If running under Windows and themes are enabled for the applica‐
158 tion, this function returns a suitable colour for painting the
159 background of a notebook page, and can be passed to wxWin‐
160 dow:setBackgroundColour/2.
161
162 Otherwise, an uninitialised colour will be returned.
163
164 setImageList(This, ImageList) -> ok
165
166 Types:
167
168 This = wxNotebook()
169 ImageList = wxImageList:wxImageList()
170
171 Sets the image list to use.
172
173 It does not take ownership of the image list, you must delete it
174 yourself.
175
176 See: wxImageList, assignImageList/2
177
178 setPadding(This, Padding) -> ok
179
180 Types:
181
182 This = wxNotebook()
183 Padding = {W :: integer(), H :: integer()}
184
185 Sets the amount of space around each page's icon and label, in
186 pixels.
187
188 Note: The vertical padding cannot be changed in wxGTK.
189
190 setPageSize(This, Size) -> ok
191
192 Types:
193
194 This = wxNotebook()
195 Size = {W :: integer(), H :: integer()}
196
197 Sets the width and height of the pages.
198
199 Note: This method is currently not implemented for wxGTK.
200
201 setPageImage(This, Page, Image) -> boolean()
202
203 Types:
204
205 This = wxNotebook()
206 Page = Image = integer()
207
208 Sets the image index for the given page.
209
210 image is an index into the image list which was set with setIm‐
211 ageList/2.
212
213
214
215wxWidgets team. wx 2.1.4 wxNotebook(3)