Phoenix Logo

phoenix_title wx.propgrid.PGCellRenderer

Base class for wx.propgrid.PropertyGrid cell renderers.


class_hierarchy Class Hierarchy

Inheritance diagram for class PGCellRenderer:


method_summary Methods Summary

__init__  
DrawCaptionSelectionRect Paints property category selection rectangle.
DrawEditorValue Utility to draw editor’s value, or vertically aligned text if editor is None.
DrawText Utility to draw vertically centered text.
GetImageSize Returns size of the image in front of the editable area.
PostDrawCell Utility to be called after drawing is done, to revert whatever changes PreDrawCell did.
PreDrawCell Utility to render cell bitmap and set text colour plus bg brush colour.
Render Returns True if rendered something in the foreground (text or bitmap.

api Class API



class wx.propgrid.PGCellRenderer(RefCounter)

Possible constructors:

PGCellRenderer()

Base class for PropertyGrid cell renderers.


Methods



__init__(self)


DrawCaptionSelectionRect(self, dc, x, y, w, h)

Paints property category selection rectangle.

Parameters:
  • dc (wx.DC) –
  • x (int) –
  • y (int) –
  • w (int) –
  • h (int) –


DrawEditorValue(self, dc, rect, xOffset, text, property, editor)

Utility to draw editor’s value, or vertically aligned text if editor is None.

Parameters:


DrawText(self, dc, rect, imageWidth, text)

Utility to draw vertically centered text.

Parameters:
  • dc (wx.DC) –
  • rect (wx.Rect) –
  • imageWidth (int) –
  • text (string) –


GetImageSize(self, property, column, item)

Returns size of the image in front of the editable area.

Parameters:
Return type:

Size

Note

If property is None, then this call is for a custom value. In that case the item is index to wx.propgrid.PropertyGrid‘s custom values.



PostDrawCell(self, dc, propGrid, cell, flags)

Utility to be called after drawing is done, to revert whatever changes PreDrawCell did.

Parameters:


PreDrawCell(self, dc, rect, cell, flags)

Utility to render cell bitmap and set text colour plus bg brush colour.

Parameters:
Return type:

int

Returns:

Returns image width, which, for instance, can be passed to DrawText.



Render(self, dc, rect, propertyGrid, property, column, item, flags)

Returns True if rendered something in the foreground (text or bitmap.

Parameters:
Return type:

bool