Implement best size calculation for report mode wxListCtrl.
Use the column labels to determine the minimal width required by the control to show them all in full. Also declare all image list and column-related wxListCtrl methods in wxListCtrlBase now as we need some of them in DoGetBestClientSize() implementation. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70282 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -252,12 +252,6 @@ class WXDLLIMPEXP_CORE wxListCtrl: public wxListCtrlBase
|
||||
// Insert an image/string item
|
||||
long InsertItem(long index, const wxString& label, int imageIndex);
|
||||
|
||||
// For list view mode (only), inserts a column.
|
||||
long InsertColumn(long col, wxListItem& info);
|
||||
|
||||
long InsertColumn(long col, const wxString& heading, int format = wxLIST_FORMAT_LEFT,
|
||||
int width = -1);
|
||||
|
||||
// Scrolls the list control. If in icon, small icon or report view mode,
|
||||
// x specifies the number of pixels to scroll. If in list view mode, x
|
||||
// specifies the number of columns to scroll.
|
||||
@@ -371,14 +365,14 @@ class WXDLLIMPEXP_CORE wxListCtrl: public wxListCtrlBase
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
|
||||
protected:
|
||||
// Implement base class pure virtual methods.
|
||||
long DoInsertColumn(long col, const wxListItem& info);
|
||||
|
||||
// protected overrides needed for pimpl approach
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
long m_current;
|
||||
wxListCtrlTextCtrlWrapper *m_textctrlWrapper;
|
||||
wxListCtrlRenameTimer *m_renameTimer;
|
||||
|
Reference in New Issue
Block a user