Search

A listbox-like control allowing the user to rearrange the items and to enable or disable them.

This class allows to change the order of the items shown in it as well as to check or uncheck them individually. The data structure used to allow this is the order array which contains the items indices indexed by their position with an added twist that the unchecked items are represented by the bitwise complement of the corresponding index (for any architecture using two’s complement for negative numbers representation (i.e. just about any at all) this means that a checked item N is represented by -N-1 in unchecked state). In practice this means that you must apply the C bitwise complement operator when constructing the order array, e.g.

order=[0]# checked item #0

So, for example, the array order [1 -3 0] used in conjunction with the items array [“first”, “second”, “third”] means that the items order is “second”, “third”, “first” and the “third” item is unchecked while the other two are checked.

This convention is used both for the order argument of the control constructor or Create and for the array returned from GetCurrentOrder.

Usually this control will be used together with other controls allowing to move the items around in it interactively. The simplest possible solution is to use wx.RearrangeCtrl which combines it with two standard buttons to move the current item up or down.

Effectively creates the window for an object created using the default constructor.

This function is very similar to wx.CheckListBox.Create except that it has an additional parameter specifying the initial order of the items. Please see the class documentation for the explanation of the conventions used by the order argument.