![]() ![]() Returns the number of currently selected items. Returns pointer to the data model associated with the control (if any). GetItemRect (const wxDataViewItem &item, const wxDataViewColumn *col=NULL) const Returns the column that currently has focus. Returns the position of the column or -1 if not found in the control. GetColumnPosition (const wxDataViewColumn *column) const Programmatically starts editing given cell of item.ĮnableDragSource (const wxDataFormat &format)Įnable drag operations using the given format.ĮnableDropTarget (const wxDataFormat &format)Įnable drop operations using the given format.ĮnsureVisible (const wxDataViewItem &item, const wxDataViewColumn *column=NULL)Ĭall this to ensure that the given item is visible.ĮxpandAncestors (const wxDataViewItem &item) Inserts a wxDataViewColumn to the control.Īssociates a wxDataViewModel with the control.ĮditItem (const wxDataViewItem &item, const wxDataViewColumn *column) InsertColumn (unsigned int pos, wxDataViewColumn *col) Prepends a wxDataViewColumn to the control. WxDataViewCtrl ( wxWindow *parent, wxWindowID id, const wxPoint &pos= wxDefaultPosition, const wxSize &size= wxDefaultSize, long style=0, const wxValidator &validator= wxDefaultValidator, const wxString &name=wxDataViewCtrlNameStr)Ĭall to allow using multiple columns for sorting.Ĭreate ( wxWindow *parent, wxWindowID id, const wxPoint &pos= wxDefaultPosition, const wxSize &size= wxDefaultSize, long style=0, const wxValidator &validator= wxDefaultValidator, const wxString &name=wxDataViewCtrlNameStr)Īppends a wxDataViewColumn to the control. This class supports the following styles: In this case you would presumably call ToggleSortB圜olumn() from some other event handler to still allow the user to configure sort order somehow. If this behaviour is not appropriate, you may handle w圎VT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK event yourself to prevent it from happening. The latter must be explicitly enabled using AllowMultiColumnSort(), which will also indicate whether this feature is supported, as it changes the default behaviour of right clicking the column header to add or remove it to the set of columns used for sorting. not wxGTK nor wxOSX) also sorting by multiple columns at once. This control supports single column sorting and on some platforms (currently only those using the generic version, i.e. Accordingly, all type information uses the strings returned from wxVariant::GetType. Additionally, the user can write custom renderers deriving from wxDataViewCustomRenderer for displaying anything.Īll data transfer from the control to the model and the user code is done through wxVariant which can be extended to support more data formats as necessary. Each wxDataViewColumn in turn owns 1 instance of a wxDataViewRenderer to render its cells.Ī number of standard renderers for rendering text, dates, images, toggle, a progress bar etc. Then you need to add a number of wxDataViewColumn to this control to define what each column shall display. Instead you need to write your own wxDataViewModel and associate it with this control. Unlike wxListCtrl, wxDataViewCtrl doesn't get its data from the user through virtual functions or by setting it directly. Both wxDataViewTreeCtrl and wxDataViewListCtrl can be used without defining your own wxDataViewModel.Ī wxDataViewItem is used to represent a (visible) item in the control. Likewise, if you only want to display simple table structure you can use the specialized wxDataViewListCtrl class. ![]() If you only need to display a simple tree structure with an API more like the older wxTreeCtrl class, then the specialized wxDataViewTreeCtrl can be used. WxDataViewCtrl is a control to display data either in a tree like fashion or in a tabular form or both. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |