Added wxPropertyGridManager header support; Refactored wxPropertyGrid DoSetSplitterPosition() code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62867 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -128,8 +128,8 @@ public:
|
||||
@class wxPropertyGridManager
|
||||
|
||||
wxPropertyGridManager is an efficient multi-page version of wxPropertyGrid,
|
||||
which can optionally have toolbar for mode and page selection, and a help text
|
||||
box.
|
||||
which can optionally have toolbar for mode and page selection, a help text
|
||||
box, and a header.
|
||||
|
||||
wxPropertyGridManager inherits from wxPropertyGridInterface, and as such
|
||||
it has most property manipulation functions. However, only some of them affect
|
||||
@@ -183,6 +183,9 @@ public:
|
||||
page->Append( "Text",wxPG_LABEL,"(no text)" );
|
||||
|
||||
page->Append( new wxFontProperty("Font",wxPG_LABEL) );
|
||||
|
||||
// Display a header above the grid
|
||||
pgMan->ShowHeader();
|
||||
@endcode
|
||||
|
||||
@section propgridmanager_window_styles_ Window Styles
|
||||
@@ -427,9 +430,22 @@ public:
|
||||
|
||||
/**
|
||||
Sets number of columns on given page (default is current page).
|
||||
|
||||
@remarks If you use header, then you should always use this
|
||||
member function to set the column count, instead of
|
||||
ones present in wxPropertyGrid or wxPropertyGridPage.
|
||||
*/
|
||||
void SetColumnCount( int colCount, int page = -1 );
|
||||
|
||||
/**
|
||||
Sets a column title. Default title for column 0 is "Property",
|
||||
and "Value" for column 1.
|
||||
|
||||
@remarks If header is not shown yet, then calling this
|
||||
member function will make it visible.
|
||||
*/
|
||||
void SetColumnTitle( int idx, const wxString& title );
|
||||
|
||||
/**
|
||||
Sets label and text in description box.
|
||||
*/
|
||||
@@ -451,22 +467,41 @@ public:
|
||||
*/
|
||||
void SetSplitterLeft( bool subProps = false, bool allPages = true );
|
||||
|
||||
/** Sets splitter position on individual page. */
|
||||
/**
|
||||
Sets splitter position on individual page.
|
||||
|
||||
@remarks If you use header, then you should always use this
|
||||
member function to set the splitter position, instead of
|
||||
ones present in wxPropertyGrid or wxPropertyGridPage.
|
||||
*/
|
||||
void SetPageSplitterPosition( int page, int pos, int column = 0 );
|
||||
|
||||
/**
|
||||
Sets splitter position for all pages.
|
||||
|
||||
@remarks Splitter position cannot exceed grid size, and therefore setting
|
||||
it during form creation may fail as initial grid size is often
|
||||
smaller than desired splitter position, especially when sizers
|
||||
are being used.
|
||||
@remarks Splitter position cannot exceed grid size, and therefore
|
||||
setting it during form creation may fail as initial grid
|
||||
size is often smaller than desired splitter position,
|
||||
especially when sizers are being used.
|
||||
|
||||
If you use header, then you should always use this
|
||||
member function to set the splitter position, instead of
|
||||
ones present in wxPropertyGrid or wxPropertyGridPage.
|
||||
*/
|
||||
void SetSplitterPosition( int pos, int column = 0 );
|
||||
|
||||
/** Synonyme for SelectPage(name). */
|
||||
void SetStringSelection( const wxChar* name );
|
||||
|
||||
/**
|
||||
Show or hide the property grid header control. It is hidden
|
||||
by the default.
|
||||
|
||||
@remarks Grid may look better if you use wxPG_NO_INTERNAL_BORDER
|
||||
window style when showing a header.
|
||||
*/
|
||||
void ShowHeader(bool show = true);
|
||||
|
||||
protected:
|
||||
|
||||
//
|
||||
|
@@ -91,7 +91,8 @@ wxPG_TOOLBAR = 0x00001000,
|
||||
*/
|
||||
wxPG_DESCRIPTION = 0x00002000,
|
||||
|
||||
/** wxPropertyGridManager only: don't show an internal border around the property grid
|
||||
/** wxPropertyGridManager only: don't show an internal border around the
|
||||
property grid. Recommended if you use a header.
|
||||
*/
|
||||
wxPG_NO_INTERNAL_BORDER = 0x00004000
|
||||
|
||||
@@ -397,7 +398,9 @@ typedef int (*wxPGSortCallback)(wxPropertyGrid* propGrid,
|
||||
starts resizing a column - can be vetoed.
|
||||
@event{EVT_PG_COL_DRAGGING,(id, func)}
|
||||
Respond to wxEVT_PG_COL_DRAGGING, event, generated when a
|
||||
column resize by user is in progress.
|
||||
column resize by user is in progress. This event is also generated
|
||||
when user double-clicks the splitter in order to recenter
|
||||
it.
|
||||
@event{EVT_PG_COL_END_DRAG(id, func)}
|
||||
Respond to wxEVT_PG_COL_END_DRAG event, generated after column
|
||||
resize by user has finished.
|
||||
|
Reference in New Issue
Block a user