Skip to content

Commit

Permalink
Improve wxDataViewListCtrl::AppendItem() and related methods docs
Browse files Browse the repository at this point in the history
Explain that the vector passed to {Append,Insert,Prepend}Item() must
have the same number of elements as there are columns in the control and
that no more columns can be added after adding any items.

See wxWidgets#724
  • Loading branch information
vadz committed Feb 17, 2018
1 parent 3567cd5 commit 23c2d67
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions interface/wx/dataview.h
Original file line number Diff line number Diff line change
Expand Up @@ -2960,17 +2960,29 @@ class wxDataViewListCtrl: public wxDataViewCtrl
//@{

/**
Appends an item (=row) to the control and store.
Appends an item (i.e.\ a row) to the control.
Note that the size of @a values vector must be exactly equal to the
number of columns in the control and that columns must not be modified
after adding any items to the control (or, conversely, items must not
be added before the columns are set up).
*/
void AppendItem( const wxVector<wxVariant> &values, wxUIntPtr data = NULL );

/**
Prepends an item (=row) to the control and store.
Prepends an item (i.e.\ a row) to the control.
See remarks for AppendItem() for preconditions of this method.
*/
void PrependItem( const wxVector<wxVariant> &values, wxUIntPtr data = NULL );

/**
Inserts an item (=row) to the control and store.
Inserts an item (i.e.\ a row) to the control.
See remarks for AppendItem() for preconditions of this method.
Additionally, @a row must be less than or equal to the current number
of items in the control (see GetItemCount()).
*/
void InsertItem( unsigned int row, const wxVector<wxVariant> &values, wxUIntPtr data = NULL );

Expand Down

0 comments on commit 23c2d67

Please sign in to comment.