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

NAME

6       wxTreeCtrl - Functions for wxTreeCtrl class
7

DESCRIPTION

9       A tree control presents information as a hierarchy, with items that may
10       be expanded to show further items. Items in a tree control  are  refer‐
11       enced  by  wxTreeItemId  (not  implemented in wx) handles, which may be
12       tested for validity by calling wxTreeItemId::IsOk() (not implemented in
13       wx).
14
15       A similar control with a fully native implementation for GTK+ and macOS
16       as well is wxDataViewTreeCtrl (not implemented in wx).
17
18       To intercept events from a tree control, use the event table macros de‐
19       scribed in wxTreeEvent.
20
21       Styles
22
23       This class supports the following styles:
24
25       See also overview_windowstyles.
26
27       Win32 notes:
28
29       wxTreeCtrl  class uses the standard common treeview control under Win32
30       implemented in the system library comctl32.dll. Some versions  of  this
31       library  are known to have bugs with handling the tree control colours:
32       the usual symptom is that the expanded items leave black (or  otherwise
33       incorrectly  coloured)  background behind them, especially for the con‐
34       trols using non-default background colour. The recommended solution  is
35       to  upgrade  the comctl32.dll to a newer version: see http://www.micro
36       soft.com/downloads/details.aspx?fami‐
37       lyid=cb2cf3a2-8025-4e8f-8511-9b476a8d35d2
38
39       See: wxDataViewTreeCtrl (not implemented in wx), wxTreeEvent, wxTreeIt‐
40       emData (not implemented in wx), Overview treectrl, wxListBox,  wxListC‐
41       trl, wxImageList
42
43       This  class is derived (and can use functions) from: wxControl wxWindow
44       wxEvtHandler
45
46       wxWidgets docs: wxTreeCtrl
47

EVENTS

49       Event types emitted  from  this  class:  command_tree_begin_drag,  com‐
50       mand_tree_begin_rdrag,   command_tree_end_drag,  command_tree_begin_la‐
51       bel_edit, command_tree_end_label_edit,  command_tree_delete_item,  com‐
52       mand_tree_get_info, command_tree_set_info, command_tree_item_activated,
53       command_tree_item_collapsed,     command_tree_item_collapsing,     com‐
54       mand_tree_item_expanded,        command_tree_item_expanding,       com‐
55       mand_tree_item_right_click,    command_tree_item_middle_click,     com‐
56       mand_tree_sel_changed,          command_tree_sel_changing,         com‐
57       mand_tree_key_down,         command_tree_item_gettooltip,          com‐
58       mand_tree_item_menu, command_tree_state_image_click
59

DATA TYPES

61       wxTreeCtrl() = wx:wx_object()
62

EXPORTS

64       new() -> wxTreeCtrl()
65
66              Default Constructor.
67
68       new(Parent) -> wxTreeCtrl()
69
70              Types:
71
72                 Parent = wxWindow:wxWindow()
73
74       new(Parent, Options :: [Option]) -> wxTreeCtrl()
75
76              Types:
77
78                 Parent = wxWindow:wxWindow()
79                 Option =
80                     {id, integer()} |
81                     {pos, {X :: integer(), Y :: integer()}} |
82                     {size, {W :: integer(), H :: integer()}} |
83                     {style, integer()} |
84                     {validator, wx:wx_object()}
85
86              Constructor, creating and showing a tree control.
87
88              See: create/3, wxValidator (not implemented in wx)
89
90       destroy(This :: wxTreeCtrl()) -> ok
91
92              Destructor, destroying the tree control.
93
94       addRoot(This, Text) -> integer()
95
96              Types:
97
98                 This = wxTreeCtrl()
99                 Text = unicode:chardata()
100
101       addRoot(This, Text, Options :: [Option]) -> integer()
102
103              Types:
104
105                 This = wxTreeCtrl()
106                 Text = unicode:chardata()
107                 Option =
108                     {image, integer()} |
109                     {selectedImage, integer()} |
110                     {data, term()}
111
112              Adds the root node to the tree, returning the new item.
113
114              The image and selImage parameters are an index within the normal
115              image list specifying the image to use for  unselected  and  se‐
116              lected  items,  respectively.  If image > -1 and selImage is -1,
117              the same image is used for both selected and unselected items.
118
119       appendItem(This, Parent, Text) -> integer()
120
121              Types:
122
123                 This = wxTreeCtrl()
124                 Parent = integer()
125                 Text = unicode:chardata()
126
127       appendItem(This, Parent, Text, Options :: [Option]) -> integer()
128
129              Types:
130
131                 This = wxTreeCtrl()
132                 Parent = integer()
133                 Text = unicode:chardata()
134                 Option =
135                     {image, integer()} |
136                     {selectedImage, integer()} |
137                     {data, term()}
138
139              Appends an item to the end of the branch identified  by  parent,
140              return a new item id.
141
142              The image and selImage parameters are an index within the normal
143              image list specifying the image to use for  unselected  and  se‐
144              lected  items,  respectively.  If image > -1 and selImage is -1,
145              the same image is used for both selected and unselected items.
146
147       assignImageList(This, ImageList) -> ok
148
149              Types:
150
151                 This = wxTreeCtrl()
152                 ImageList = wxImageList:wxImageList()
153
154              Sets the normal image list.
155
156              The image list assigned with this method will  be  automatically
157              deleted by wxTreeCtrl as appropriate (i.e. it takes ownership of
158              the list).
159
160              See: setImageList/2
161
162       assignStateImageList(This, ImageList) -> ok
163
164              Types:
165
166                 This = wxTreeCtrl()
167                 ImageList = wxImageList:wxImageList()
168
169              Sets the state image list.
170
171              Image list assigned  with  this  method  will  be  automatically
172              deleted by wxTreeCtrl as appropriate (i.e. it takes ownership of
173              the list).
174
175              See: setStateImageList/2
176
177       collapse(This, Item) -> ok
178
179              Types:
180
181                 This = wxTreeCtrl()
182                 Item = integer()
183
184              Collapses the given item.
185
186       collapseAndReset(This, Item) -> ok
187
188              Types:
189
190                 This = wxTreeCtrl()
191                 Item = integer()
192
193              Collapses the given item and removes all children.
194
195       create(This, Parent) -> boolean()
196
197              Types:
198
199                 This = wxTreeCtrl()
200                 Parent = wxWindow:wxWindow()
201
202       create(This, Parent, Options :: [Option]) -> boolean()
203
204              Types:
205
206                 This = wxTreeCtrl()
207                 Parent = wxWindow:wxWindow()
208                 Option =
209                     {id, integer()} |
210                     {pos, {X :: integer(), Y :: integer()}} |
211                     {size, {W :: integer(), H :: integer()}} |
212                     {style, integer()} |
213                     {validator, wx:wx_object()}
214
215              Creates the tree control.
216
217              See new/2 for further details.
218
219       delete(This, Item) -> ok
220
221              Types:
222
223                 This = wxTreeCtrl()
224                 Item = integer()
225
226              Deletes the specified item.
227
228              A EVT_TREE_DELETE_ITEM event will be generated.
229
230              This function may cause a subsequent call to  getNextChild/3  to
231              fail.
232
233       deleteAllItems(This) -> ok
234
235              Types:
236
237                 This = wxTreeCtrl()
238
239              Deletes all items in the control.
240
241              This  function  generates wxEVT_TREE_DELETE_ITEM events for each
242              item being deleted, including the root one if it is shown,  i.e.
243              unless wxTR_HIDE_ROOT style is used.
244
245       deleteChildren(This, Item) -> ok
246
247              Types:
248
249                 This = wxTreeCtrl()
250                 Item = integer()
251
252              Deletes  all  children  of  the given item (but not the item it‐
253              self).
254
255              A wxEVT_TREE_DELETE_ITEM event will be generated for every  item
256              being deleted.
257
258              If you have called setItemHasChildren/3, you may need to call it
259              again since deleteChildren/2 does not  automatically  clear  the
260              setting.
261
262       editLabel(This, Item) -> wxTextCtrl:wxTextCtrl()
263
264              Types:
265
266                 This = wxTreeCtrl()
267                 Item = integer()
268
269              Starts editing the label of the given item.
270
271              This  function generates a EVT_TREE_BEGIN_LABEL_EDIT event which
272              can be vetoed so that no text control will appear  for  in-place
273              editing.
274
275              If  the  user changed the label (i.e. s/he does not press ESC or
276              leave the  text  control  without  changes,  a  EVT_TREE_END_LA‐
277              BEL_EDIT event will be sent which can be vetoed as well.
278
279              See: EndEditLabel() (not implemented in wx), wxTreeEvent
280
281       ensureVisible(This, Item) -> ok
282
283              Types:
284
285                 This = wxTreeCtrl()
286                 Item = integer()
287
288              Scrolls  and/or  expands  items to ensure that the given item is
289              visible.
290
291              This method can be used, and will work, even while the window is
292              frozen (see wxWindow:freeze/1).
293
294       expand(This, Item) -> ok
295
296              Types:
297
298                 This = wxTreeCtrl()
299                 Item = integer()
300
301              Expands the given item.
302
303       getBoundingRect(This, Item) -> Result
304
305              Types:
306
307                 Result =
308                     {Res :: boolean(),
309                      Rect ::
310                          {X :: integer(),
311                           Y :: integer(),
312                           W :: integer(),
313                           H :: integer()}}
314                 This = wxTreeCtrl()
315                 Item = integer()
316
317       getBoundingRect(This, Item, Options :: [Option]) -> Result
318
319              Types:
320
321                 Result =
322                     {Res :: boolean(),
323                      Rect ::
324                          {X :: integer(),
325                           Y :: integer(),
326                           W :: integer(),
327                           H :: integer()}}
328                 This = wxTreeCtrl()
329                 Item = integer()
330                 Option = {textOnly, boolean()}
331
332              Retrieves the rectangle bounding the item.
333
334              If  textOnly is true, only the rectangle around the item's label
335              will be returned, otherwise the item's image is also taken  into
336              account.
337
338              The  return  value is true if the rectangle was successfully re‐
339              trieved or false if it  was  not  (in  this  case  rect  is  not
340              changed) - for example, if the item is currently invisible.
341
342              Notice  that the rectangle coordinates are logical, not physical
343              ones. So, for example, the x coordinate may be negative  if  the
344              tree has a horizontal scrollbar and its position is not 0.
345
346       getChildrenCount(This, Item) -> integer()
347
348              Types:
349
350                 This = wxTreeCtrl()
351                 Item = integer()
352
353       getChildrenCount(This, Item, Options :: [Option]) -> integer()
354
355              Types:
356
357                 This = wxTreeCtrl()
358                 Item = integer()
359                 Option = {recursively, boolean()}
360
361              Returns the number of items in the branch.
362
363              If recursively is true, returns the total number of descendants,
364              otherwise only one level of children is counted.
365
366       getCount(This) -> integer()
367
368              Types:
369
370                 This = wxTreeCtrl()
371
372              Returns the number of items in the control.
373
374       getEditControl(This) -> wxTextCtrl:wxTextCtrl()
375
376              Types:
377
378                 This = wxTreeCtrl()
379
380              Returns the edit control being currently used to edit a label.
381
382              Returns NULL if no label is being edited.
383
384              Note: This is currently only implemented for wxMSW.
385
386       getFirstChild(This, Item) -> Result
387
388              Types:
389
390                 Result = {Res :: integer(), Cookie :: integer()}
391                 This = wxTreeCtrl()
392                 Item = integer()
393
394              Returns the first child; call getNextChild/3 for the next child.
395
396              For this enumeration function you must pass in a 'cookie' param‐
397              eter  which  is  opaque for the application but is necessary for
398              the library to make these functions reentrant (i.e.  allow  more
399              than one enumeration on one and the same object simultaneously).
400              The cookie passed to getFirstChild/2 and  getNextChild/3  should
401              be the same variable.
402
403              Returns an invalid tree item (i.e. wxTreeItemId::IsOk() (not im‐
404              plemented in wx) returns false) if there are  no  further  chil‐
405              dren.
406
407              See: getNextChild/3, getNextSibling/2
408
409       getNextChild(This, Item, Cookie) -> Result
410
411              Types:
412
413                 Result = {Res :: integer(), Cookie :: integer()}
414                 This = wxTreeCtrl()
415                 Item = Cookie = integer()
416
417              Returns  the  next  child;  call  getFirstChild/2  for the first
418              child.
419
420              For this enumeration function you must pass in a 'cookie' param‐
421              eter  which  is  opaque for the application but is necessary for
422              the library to make these functions reentrant (i.e.  allow  more
423              than one enumeration on one and the same object simultaneously).
424              The cookie passed to getFirstChild/2 and  getNextChild/3  should
425              be the same.
426
427              Returns an invalid tree item if there are no further children.
428
429              See: getFirstChild/2
430
431       getFirstVisibleItem(This) -> integer()
432
433              Types:
434
435                 This = wxTreeCtrl()
436
437              Returns the first visible item.
438
439       getImageList(This) -> wxImageList:wxImageList()
440
441              Types:
442
443                 This = wxTreeCtrl()
444
445              Returns the normal image list.
446
447       getIndent(This) -> integer()
448
449              Types:
450
451                 This = wxTreeCtrl()
452
453              Returns the current tree control indentation.
454
455       getItemBackgroundColour(This, Item) -> wx:wx_colour4()
456
457              Types:
458
459                 This = wxTreeCtrl()
460                 Item = integer()
461
462              Returns the background colour of the item.
463
464       getItemData(This, Item) -> term()
465
466              Types:
467
468                 This = wxTreeCtrl()
469                 Item = integer()
470
471              Returns the tree item data associated with the item.
472
473              See: wxTreeItemData (not implemented in wx)
474
475       getItemFont(This, Item) -> wxFont:wxFont()
476
477              Types:
478
479                 This = wxTreeCtrl()
480                 Item = integer()
481
482              Returns the font of the item label.
483
484              If  the  font  hadn't been explicitly set for the specified item
485              with setItemFont/3, returns an invalid ?wxNullFont font.  wxWin‐
486              dow:getFont/1  can  be  used to retrieve the global tree control
487              font used for the items without any specific font.
488
489       getItemImage(This, Item) -> integer()
490
491              Types:
492
493                 This = wxTreeCtrl()
494                 Item = integer()
495
496       getItemImage(This, Item, Options :: [Option]) -> integer()
497
498              Types:
499
500                 This = wxTreeCtrl()
501                 Item = integer()
502                 Option = {which, wx:wx_enum()}
503
504              Gets the specified item image.
505
506              The value of which may be:
507
508       getItemText(This, Item) -> unicode:charlist()
509
510              Types:
511
512                 This = wxTreeCtrl()
513                 Item = integer()
514
515              Returns the item label.
516
517       getItemTextColour(This, Item) -> wx:wx_colour4()
518
519              Types:
520
521                 This = wxTreeCtrl()
522                 Item = integer()
523
524              Returns the colour of the item label.
525
526       getLastChild(This, Item) -> integer()
527
528              Types:
529
530                 This = wxTreeCtrl()
531                 Item = integer()
532
533              Returns the last child of the item (or an invalid tree  item  if
534              this item has no children).
535
536              See: getFirstChild/2, getNextSibling/2, getLastChild/2
537
538       getNextSibling(This, Item) -> integer()
539
540              Types:
541
542                 This = wxTreeCtrl()
543                 Item = integer()
544
545              Returns the next sibling of the specified item; call getPrevSib‐
546              ling/2 for the previous sibling.
547
548              Returns an invalid tree item if there are no further siblings.
549
550              See: getPrevSibling/2
551
552       getNextVisible(This, Item) -> integer()
553
554              Types:
555
556                 This = wxTreeCtrl()
557                 Item = integer()
558
559              Returns the next visible item or an invalid item if this item is
560              the last visible one.
561
562              Note: The item itself must be visible.
563
564       getItemParent(This, Item) -> integer()
565
566              Types:
567
568                 This = wxTreeCtrl()
569                 Item = integer()
570
571              Returns the item's parent.
572
573       getPrevSibling(This, Item) -> integer()
574
575              Types:
576
577                 This = wxTreeCtrl()
578                 Item = integer()
579
580              Returns  the  previous  sibling of the specified item; call get‐
581              NextSibling/2 for the next sibling.
582
583              Returns an invalid tree item if there are no further children.
584
585              See: getNextSibling/2
586
587       getPrevVisible(This, Item) -> integer()
588
589              Types:
590
591                 This = wxTreeCtrl()
592                 Item = integer()
593
594              Returns the previous visible item or an  invalid  item  if  this
595              item is the first visible one.
596
597              Note: The item itself must be visible.
598
599       getRootItem(This) -> integer()
600
601              Types:
602
603                 This = wxTreeCtrl()
604
605              Returns the root item for the tree control.
606
607       getSelection(This) -> integer()
608
609              Types:
610
611                 This = wxTreeCtrl()
612
613              Returns  the selection, or an invalid item if there is no selec‐
614              tion.
615
616              This function only works with the controls without wxTR_MULTIPLE
617              style,  use  getSelections/1 for the controls which do have this
618              style or, if a single item is wanted, use GetFocusedItem()  (not
619              implemented in wx).
620
621       getSelections(This) -> Result
622
623              Types:
624
625                 Result = {Res :: integer(), Selection :: [integer()]}
626                 This = wxTreeCtrl()
627
628              Fills  the  array of tree items passed in with the currently se‐
629              lected items.
630
631              This function  can  be  called  only  if  the  control  has  the
632              wxTR_MULTIPLE style.
633
634              Returns the number of selected items.
635
636       getStateImageList(This) -> wxImageList:wxImageList()
637
638              Types:
639
640                 This = wxTreeCtrl()
641
642              Returns  the  state  image  list (from which application-defined
643              state images are taken).
644
645       hitTest(This, Point) -> Result
646
647              Types:
648
649                 Result = {Res :: integer(), Flags :: integer()}
650                 This = wxTreeCtrl()
651                 Point = {X :: integer(), Y :: integer()}
652
653              Calculates which (if any) item is under the given point, return‐
654              ing the tree item id at this point plus extra information flags.
655
656              flags is a bitlist of the following:
657
658       insertItem(This, Parent, Previous, Text) -> integer()
659
660              Types:
661
662                 This = wxTreeCtrl()
663                 Parent = Previous = integer()
664                 Text = unicode:chardata()
665
666       insertItem(This, Parent, Previous, Text, Options :: [Option]) ->
667                     integer()
668
669              Types:
670
671                 This = wxTreeCtrl()
672                 Parent = Previous = integer()
673                 Text = unicode:chardata()
674                 Option =
675                     {image,  integer()}  |  {selImage,  integer()}  |  {data,
676                 term()}
677
678              Inserts an item after a given one (previous).
679
680              The image and selImage parameters are an index within the normal
681              image  list  specifying  the image to use for unselected and se‐
682              lected items, respectively. If image > -1 and  selImage  is  -1,
683              the same image is used for both selected and unselected items.
684
685       isBold(This, Item) -> boolean()
686
687              Types:
688
689                 This = wxTreeCtrl()
690                 Item = integer()
691
692              Returns true if the given item is in bold state.
693
694              See: setItemBold/3
695
696       isExpanded(This, Item) -> boolean()
697
698              Types:
699
700                 This = wxTreeCtrl()
701                 Item = integer()
702
703              Returns true if the item is expanded (only makes sense if it has
704              children).
705
706       isSelected(This, Item) -> boolean()
707
708              Types:
709
710                 This = wxTreeCtrl()
711                 Item = integer()
712
713              Returns true if the item is selected.
714
715       isVisible(This, Item) -> boolean()
716
717              Types:
718
719                 This = wxTreeCtrl()
720                 Item = integer()
721
722              Returns true if the item is visible on the screen.
723
724       itemHasChildren(This, Item) -> boolean()
725
726              Types:
727
728                 This = wxTreeCtrl()
729                 Item = integer()
730
731              Returns true if the item has children.
732
733       isTreeItemIdOk(Item) -> boolean()
734
735              Types:
736
737                 Item = integer()
738
739              Returns true if the item is valid.
740
741       prependItem(This, Parent, Text) -> integer()
742
743              Types:
744
745                 This = wxTreeCtrl()
746                 Parent = integer()
747                 Text = unicode:chardata()
748
749       prependItem(This, Parent, Text, Options :: [Option]) -> integer()
750
751              Types:
752
753                 This = wxTreeCtrl()
754                 Parent = integer()
755                 Text = unicode:chardata()
756                 Option =
757                     {image, integer()} |
758                     {selectedImage, integer()} |
759                     {data, term()}
760
761              Appends an item as the first child of parent, return a new  item
762              id.
763
764              The image and selImage parameters are an index within the normal
765              image list specifying the image to use for  unselected  and  se‐
766              lected  items,  respectively.  If image > -1 and selImage is -1,
767              the same image is used for both selected and unselected items.
768
769       scrollTo(This, Item) -> ok
770
771              Types:
772
773                 This = wxTreeCtrl()
774                 Item = integer()
775
776              Scrolls the specified item into view.
777
778              Note that this method doesn't work while the  window  is  frozen
779              (See wxWindow:freeze/1), at least under MSW.
780
781              See: ensureVisible/2
782
783       selectItem(This, Item) -> ok
784
785              Types:
786
787                 This = wxTreeCtrl()
788                 Item = integer()
789
790       selectItem(This, Item, Options :: [Option]) -> ok
791
792              Types:
793
794                 This = wxTreeCtrl()
795                 Item = integer()
796                 Option = {select, boolean()}
797
798              Selects the given item.
799
800              In  multiple  selection controls, can be also used to deselect a
801              currently selected item if the value of select is false.
802
803              Notice   that   calling   this   method   will   generate    wx‐
804              EVT_TREE_SEL_CHANGING and wxEVT_TREE_SEL_CHANGED events and that
805              the change could be vetoed by the former event handler.
806
807       setIndent(This, Indent) -> ok
808
809              Types:
810
811                 This = wxTreeCtrl()
812                 Indent = integer()
813
814              Sets the indentation for the tree control.
815
816       setImageList(This, ImageList) -> ok
817
818              Types:
819
820                 This = wxTreeCtrl()
821                 ImageList = wxImageList:wxImageList()
822
823              Sets the normal image list.
824
825              The image list assigned with this method will not be deleted  by
826              wxTreeCtrl's destructor, you must delete it yourself.
827
828              See: assignImageList/2
829
830       setItemBackgroundColour(This, Item, Col) -> ok
831
832              Types:
833
834                 This = wxTreeCtrl()
835                 Item = integer()
836                 Col = wx:wx_colour()
837
838              Sets the colour of the item's background.
839
840       setItemBold(This, Item) -> ok
841
842              Types:
843
844                 This = wxTreeCtrl()
845                 Item = integer()
846
847       setItemBold(This, Item, Options :: [Option]) -> ok
848
849              Types:
850
851                 This = wxTreeCtrl()
852                 Item = integer()
853                 Option = {bold, boolean()}
854
855              Makes  item appear in bold font if bold parameter is true or re‐
856              sets it to the normal state.
857
858              See: isBold/2
859
860       setItemData(This, Item, Data) -> ok
861
862              Types:
863
864                 This = wxTreeCtrl()
865                 Item = integer()
866                 Data = term()
867
868              Sets the item client data.
869
870              Notice that the client data previously associated with the  item
871              (if any) is not freed by this function and so calling this func‐
872              tion multiple times for the same  item  will  result  in  memory
873              leaks unless you delete the old item data pointer yourself.
874
875       setItemDropHighlight(This, Item) -> ok
876
877              Types:
878
879                 This = wxTreeCtrl()
880                 Item = integer()
881
882       setItemDropHighlight(This, Item, Options :: [Option]) -> ok
883
884              Types:
885
886                 This = wxTreeCtrl()
887                 Item = integer()
888                 Option = {highlight, boolean()}
889
890              Gives  the  item  the  visual  feedback for Drag'n'Drop actions,
891              which is useful if something is dragged from  the  outside  onto
892              the  tree control (as opposed to a DnD operation within the tree
893              control, which already is implemented internally).
894
895       setItemFont(This, Item, Font) -> ok
896
897              Types:
898
899                 This = wxTreeCtrl()
900                 Item = integer()
901                 Font = wxFont:wxFont()
902
903              Sets the item's font.
904
905              All items in the tree should have the same height to avoid  text
906              clipping,  so  the  fonts  height  should be the same for all of
907              them, although font attributes may vary.
908
909              See: setItemBold/3
910
911       setItemHasChildren(This, Item) -> ok
912
913              Types:
914
915                 This = wxTreeCtrl()
916                 Item = integer()
917
918       setItemHasChildren(This, Item, Options :: [Option]) -> ok
919
920              Types:
921
922                 This = wxTreeCtrl()
923                 Item = integer()
924                 Option = {has, boolean()}
925
926              Force appearance of the button next to the item.
927
928              This is useful to allow the user to expand the items which don't
929              have any children now, but instead adding them only when needed,
930              thus minimizing memory usage and loading time.
931
932       setItemImage(This, Item, Image) -> ok
933
934              Types:
935
936                 This = wxTreeCtrl()
937                 Item = Image = integer()
938
939       setItemImage(This, Item, Image, Options :: [Option]) -> ok
940
941              Types:
942
943                 This = wxTreeCtrl()
944                 Item = Image = integer()
945                 Option = {which, wx:wx_enum()}
946
947              Sets the specified item's image.
948
949              See getItemImage/3 for the description of the which parameter.
950
951       setItemText(This, Item, Text) -> ok
952
953              Types:
954
955                 This = wxTreeCtrl()
956                 Item = integer()
957                 Text = unicode:chardata()
958
959              Sets the item label.
960
961       setItemTextColour(This, Item, Col) -> ok
962
963              Types:
964
965                 This = wxTreeCtrl()
966                 Item = integer()
967                 Col = wx:wx_colour()
968
969              Sets the colour of the item's text.
970
971       setStateImageList(This, ImageList) -> ok
972
973              Types:
974
975                 This = wxTreeCtrl()
976                 ImageList = wxImageList:wxImageList()
977
978              Sets the state image list (from which application-defined  state
979              images are taken).
980
981              Image  list assigned with this method will not be deleted by wx‐
982              TreeCtrl's destructor, you must delete it yourself.
983
984              See: assignStateImageList/2
985
986       setWindowStyle(This, Styles) -> ok
987
988              Types:
989
990                 This = wxTreeCtrl()
991                 Styles = integer()
992
993              Sets the mode flags associated with the display of the tree con‐
994              trol.
995
996              The new mode takes effect immediately.
997
998              Note: Generic only; MSW ignores changes.
999
1000       sortChildren(This, Item) -> ok
1001
1002              Types:
1003
1004                 This = wxTreeCtrl()
1005                 Item = integer()
1006
1007              Sorts the children of the given item using OnCompareItems() (not
1008              implemented in wx).
1009
1010              You should override that method to change the  sort  order  (the
1011              default is ascending case-sensitive alphabetical order).
1012
1013              See:  wxTreeItemData  (not  implemented in wx), OnCompareItems()
1014              (not implemented in wx)
1015
1016       toggle(This, Item) -> ok
1017
1018              Types:
1019
1020                 This = wxTreeCtrl()
1021                 Item = integer()
1022
1023              Toggles the given item between collapsed and expanded states.
1024
1025       toggleItemSelection(This, Item) -> ok
1026
1027              Types:
1028
1029                 This = wxTreeCtrl()
1030                 Item = integer()
1031
1032              Toggles the given item between selected and unselected states.
1033
1034              For multiselection controls only.
1035
1036       unselect(This) -> ok
1037
1038              Types:
1039
1040                 This = wxTreeCtrl()
1041
1042              Removes the selection from the currently selected item (if any).
1043
1044       unselectAll(This) -> ok
1045
1046              Types:
1047
1048                 This = wxTreeCtrl()
1049
1050              This function either behaves the same as unselect/1 if the  con‐
1051              trol  doesn't have wxTR_MULTIPLE style, or removes the selection
1052              from all items if it does have this style.
1053
1054       unselectItem(This, Item) -> ok
1055
1056              Types:
1057
1058                 This = wxTreeCtrl()
1059                 Item = integer()
1060
1061              Unselects the given item.
1062
1063              This works in multiselection controls only.
1064
1065
1066
1067wxWidgets team.                    wx 2.3.1                      wxTreeCtrl(3)
Impressum