A scrollable list box control for selection of a one or more of items.
![]() | PListBox ( PInteractor * parent, StringSorting sorted = Sorted, SelectType select = SingleSelect, PDIMENSION columnWidth = 0, BOOL deleteObj = TRUE ) Create a list box with the specified options. |
![]() | PListBox ( PInteractorLayout * parent, PRESOURCE_ID ctlID, const PNotifier & notify, PINDEX * valuePtr ) Create control from interactor layout with the specified control ID. |
![]() | ~PListBox () Destroy the list box and all its contents. |
![]() | TransferValue ( int option ) This function transfers the value of the control to or from the variable pointed to by the value pointer member variable. |
![]() | AllowDeleteObjects ( BOOL yes = TRUE ) Set flag to delete entry objects using delete operator. |
![]() | DisallowDeleteObjects () Reset flag to delete entry objects using delete operator. |
![]() | DeleteEntry ( PINDEX index, BOOL update = TRUE ) Delete the entry from the list box. |
![]() | DeleteAllEntries ( BOOL update = TRUE ) Delete all of the entries in the list box. |
![]() | GetCount () const Get the count of the number of items in the list of entries in the list box. |
![]() | SetTopIndex ( PINDEX index, BOOL update = TRUE ) Set the index of the list box entry that is currently visible at the top of the list. |
![]() | GetTopIndex () const Get the index of the list box entry that is currently visible at the top of the list. |
![]() | SetColumnWidth ( PDIMENSION newWidth, BOOL update = TRUE ) Set the new width of columns in the list box. |
![]() | SetSelection ( PINDEX index ) Set the current selection to the entry specified by the index. |
![]() | GetSelection () const Get the current selection index. |
![]() | Select ( PINDEX index, BOOL update = TRUE, BOOL sel = TRUE ) Set the selection state of the list box item. |
![]() | Deselect ( PINDEX index, BOOL update = TRUE ) Reset the selection state of the list box item. |
![]() | IsSelected ( PINDEX index ) const Get the selection state of the list box item. |
![]() | GetSelCount () const Get the number of list box items that are selected. |
![]() | GetValuePointer () const Get the current value pointer associated with the control. |
![]() | SetValuePointer ( PINDEX * ptr ) Set the current value pointer associated with the control. |
![]() | PNotifier codes |
![]() | Notification codes passed to the PNotifier function when the specified notification events occur |
![]() | Overrides from class PControl |
![]() | New functions for class |
Overrides from class PInteractor
Overrides from class PInteractor
Member variables
Overrides from class PObject
System callback functions.
A scrollable list box control for selection of a one or more of items. The application writer should not normally descend from this class directly but descend from either the PStringListBox or PCustomListBox class.
Sorted
If the update parameter is FALSE then it is the users
responsibility to redraw the list box, ie call
PInteractor::Invalidate() or PInteractor::Update() some
time afterward. This is typically used if a large number of entries are
to be deleted to the list box in one go. The user would delete the
entries and then call the PInteractor::Invalidate() function on
the list box to force a redraw. This is much faster and tidier in
appearance.
If the update parameter is FALSE then it is the users
responsibility to redraw the list box, ie call
PInteractor::Invalidate() or PInteractor::Update() some
time afterward. This is typically used if entries are to be added to the
list box immediately after deleting then. This is much faster and tidier
in appearance.
If the update parameter is FALSE then it is the users
responsibility to redraw the list box, ie call
PInteractor::Invalidate() or PInteractor::Update() some
time afterward.
Note that the list box must have been created with a non-zero width in
the first place for this to work. It only allows the width to be
readjusted. For the same reason the function will assert if the
newWidth parameter is zero. If the update parameter is FALSE then it is the users
responsibility to redraw the list box, ie call
PInteractor::Invalidate() or PInteractor::Update() some
time afterward.
If the multiple selection option is used then this will deselect all
other items and only have the specified entry selected. If the
then all entries are deselected.
If the update parameter is FALSE then it is the users
responsibility to redraw the list box, ie call
PInteractor::Invalidate() or PInteractor::Update() some
time afterward. This is typically used if a large number of entries are
to be changed in the list box in one go. The user would change the
entries and then call the PInteractor::Invalidate() function on
the list box to force a redraw. This is much faster and tidier in
appearance.
If the list box was not multi select then all entries a deselected.
PListBox( PInteractorLayout * parent, PRESOURCE_ID ctlID, const PNotifier & notify, PINDEX * valuePtr )
ctlID - Identifier for the control in the layout.
notify - Function to call when changes state.
valuePtr - Variable to change to the list box state.virtual ~PListBox()
PNotifier codes
Notification codes passed to the PNotifier function when the specified notification events occur
Overrides from class PControl
virtual void TransferValue( int option )
New functions for class
virtual void AllowDeleteObjects( BOOL yes = TRUE )
virtual void DisallowDeleteObjects()
virtual void DeleteEntry( PINDEX index, BOOL update = TRUE )
update - Flag to indicate screen should be updated.virtual void DeleteAllEntries( BOOL update = TRUE )
virtual PINDEX GetCount() const
virtual void SetTopIndex( PINDEX index, BOOL update = TRUE )
update - Flag to indicate screen should be updated.virtual PINDEX GetTopIndex() const
virtual void SetColumnWidth( PDIMENSION newWidth, BOOL update = TRUE )
update - Flag to indicate screen should be updated.virtual void SetSelection( PINDEX index )
virtual PINDEX GetSelection() const
virtual void Select( PINDEX index, BOOL update = TRUE, BOOL sel = TRUE )
update - Flag to indicate screen should be updated.
sel - State in which to set the entries selection.virtual void Deselect( PINDEX index, BOOL update = TRUE )
update - Flag to indicate screen should be updated.virtual BOOL IsSelected( PINDEX index ) const
virtual PINDEX GetSelCount() const
virtual PINDEX* GetValuePointer() const
virtual void SetValuePointer( PINDEX * ptr )
BOOL sort
BOOL multi
PDIMENSION width
BOOL deleteObjects
Alphabetic index HTML hierarchy of classes or Java