Phoenix Logo

phoenix_title wx.propgrid.PropertyGridPage

Holder of property grid page information.

You can subclass this and give instance in wx.propgrid.PropertyGridManager.AddPage . It inherits from wx.EvtHandler and can be used to process events specific to this page (id of events will still be same as manager’s). If you don’t want to use it to process all events of the page, you need to return False in the derived wx.propgrid.PropertyGridPage.IsHandlingAllEvents .

Please note that wx.propgrid.PropertyGridPage lacks many non-const property manipulation functions found in wx.propgrid.PropertyGridManager. Please use parent manager (m_manager member variable) when needed.

Please note that most member functions are inherited and as such not documented on this page. This means you will probably also want to read wx.propgrid.PropertyGridInterface class reference.

phoenix_title Event Handling

wx.propgrid.PropertyGridPage receives events emitted by its wx.propgrid.PropertyGridManager, but only those events that are specific to that page. If wx.propgrid.PropertyGridPage:: IsHandlingAllEvents returns False, then unhandled events are sent to the manager’s parent, as usual. See PropertyGrid Event Handling for more information.


class_hierarchy Class Hierarchy

Inheritance diagram for class PropertyGridPage:

method_summary Methods Summary

__init__  
Clear Deletes all properties on page.
FitColumns Reduces column sizes to minimum possible that contents are still visibly (naturally some margin space will be applied as well).
GetIndex Returns page index in manager;.
GetRoot Returns “root property”.
GetSplitterPosition Returns x-coordinate position of splitter on a page.
GetToolId Returns id of the tool bar item that represents this page on wx.propgrid.PropertyGridManager‘s wx.ToolBar.
Init Do any member initialization in this method.
IsHandlingAllEvents Return False here to indicate unhandled events should be propagated to manager’s parent, as normal.
OnShow Called every time page is about to be shown.
RefreshProperty Refreshes given property on page.
SetSplitterPosition Sets splitter position on page.

api Class API



class wx.propgrid.PropertyGridPage(EvtHandler, PropertyGridInterface, PropertyGridPageState)

Possible constructors:

PropertyGridPage()

Holder of property grid page information.


Methods



__init__(self)


Clear(self)

Deletes all properties on page.



FitColumns(self)

Reduces column sizes to minimum possible that contents are still visibly (naturally some margin space will be applied as well).

Note that you can also get calculated column widths by calling GetColumnWidth immediately after this function returns.

Return type:Size
Returns:Returns minimum size for the page to still display everything.

Note

This function only works properly if size of containing grid was already fairly large.



GetIndex(self)

Returns page index in manager;.

Return type:int


GetRoot(self)

Returns “root property”.

It does not have name, etc. and it is not visible. It is only useful for accessing its children.

Return type: wx.propgrid.PGProperty


GetSplitterPosition(self, col=0)

Returns x-coordinate position of splitter on a page.

Parameters:col (int) –
Return type:int


GetToolId(self)

Returns id of the tool bar item that represents this page on wx.propgrid.PropertyGridManager‘s wx.ToolBar.

Return type:int


Init(self)

Do any member initialization in this method.

Note

  • Called every time the page is added into a manager.
  • You can add properties to the page here.


IsHandlingAllEvents(self)

Return False here to indicate unhandled events should be propagated to manager’s parent, as normal.

Return type:bool


OnShow(self)

Called every time page is about to be shown.

Useful, for instance, creating properties just-in-time.



RefreshProperty(self, p)

Refreshes given property on page.

Parameters:p (wx.propgrid.PGProperty) –


SetSplitterPosition(self, splitterPos, col=0)

Sets splitter position on page.

Parameters:
  • splitterPos (int) –
  • col (int) –

Note

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.


Properties



Index

See GetIndex



Root

See GetRoot



SplitterPosition

See GetSplitterPosition and SetSplitterPosition



ToolId

See GetToolId