wxGridCellAttr(3erl)
π NAME π
wxGridCellAttr β the Erlang Module Definition. Manual page vibe: wxGridCellAttr(3erl). It is literally Functions for wxGridCellAttr class, and yes bestie, this is the grid-cell glow-up lore. π
π¦ DESCRIPTION π¦
okay so this class is your little glow-up wand for grid cells: it can be used to alter the cellsβ appearance in the grid by changing their attributes from the defaults. Slay.
Heads up: an object of this class may be returned by wxGridTableBase::GetAttr() β and that one is not implemented in wx. Noted, no cap.
β οΈ Important: objects of this class are reference-counted, and itβs recommended to use the wxGridCellAttrPtr smart pointer class when working with them so you donβt leak memory. Protect your peace and your heap, bestie. π«Ά
Official docs drop: wxWidgets docs: wxGridCellAttr.
π DATA TYPES π
The whole type situation is giving minimal and iconic:
wxGridCellAttr() = wx:wx_object()
π₯ EXPORTS π₯
Hereβs the full function roster β no skips, no cap. π
β¨ setTextColour(This, ColText) -> ok
Types:
This = wxGridCellAttr()
ColText = wx:wx_colour()
Sets the text colour. Simple, effective, iconic. π
πΈ setBackgroundColour(This, ColBack) -> ok
Types:
This = wxGridCellAttr()
ColBack = wx:wx_colour()
Sets the background colour. The cellβs fit is about to change. π
π¦ setFont(This, Font) -> ok
Types:
This = wxGridCellAttr()
Font = wxFont:wxFont()
Sets the font. Font choices are literally main character energy.
π setAlignment(This, HAlign, VAlign) -> ok
Types:
This = wxGridCellAttr()
HAlign = VAlign = integer()
Sets the alignment. hAlign can be one of wxALIGN_LEFT, wxALIGN_CENTRE or wxALIGN_RIGHT, and vAlign can be one of wxALIGN_TOP, wxALIGN_CENTRE or wxALIGN_BOTTOM. Align your grid, align your vibes. β¨
πΈ setReadOnly(This) -> ok
Types:
This = wxGridCellAttr()
The source gives no extra description for this one, so hereβs the clean signature β the no-options version.
π
setReadOnly(This, Options :: [Option]) -> ok
Types:
This = wxGridCellAttr()
Option = {isReadOnly, boolean()}
Sets the cell as read-only.
π¦ setRenderer(This, Renderer) -> ok
Types:
This = wxGridCellAttr()
Renderer = wxGridCellRenderer:wxGridCellRenderer()
Sets the renderer to be used for cells with this attribute. Takes ownership of the pointer. Do not forget that part, bestie β it matters. π
π setEditor(This, Editor) -> ok
Types:
This = wxGridCellAttr()
Editor = wxGridCellEditor:wxGridCellEditor()
Sets the editor to be used with the cells with this attribute.
π hasTextColour(This) -> boolean()
Types:
This = wxGridCellAttr()
Returns true if this attribute has a valid text colour set.
π hasBackgroundColour(This) -> boolean()
Types:
This = wxGridCellAttr()
Returns true if this attribute has a valid background colour set.
β hasFont(This) -> boolean()
Types:
This = wxGridCellAttr()
Returns true if this attribute has a valid font set.
π§ hasAlignment(This) -> boolean()
Types:
This = wxGridCellAttr()
Returns true if this attribute has a valid alignment set.
π hasRenderer(This) -> boolean()
Types:
This = wxGridCellAttr()
Returns true if this attribute has a valid cell renderer set.
π hasEditor(This) -> boolean()
Types:
This = wxGridCellAttr()
Returns true if this attribute has a valid cell editor set.
π getTextColour(This) -> wx:wx_colour4()
Types:
This = wxGridCellAttr()
Returns the text colour.
πΈ getBackgroundColour(This) -> wx:wx_colour4()
Types:
This = wxGridCellAttr()
Returns the background colour.
π¦ getFont(This) -> wxFont:wxFont()
Types:
This = wxGridCellAttr()
Returns the font.
π§ getAlignment(This) -> {HAlign :: integer(), VAlign :: integer()}
Types:
This = wxGridCellAttr()
Get the alignment to use for the cell with the given attribute.
If this attribute doesnβt specify any alignment, the default attribute alignment is used (which can be changed using wxGrid:setDefaultCellAlignment/3 but is left and top by default). That default detail is lowkey important, bestie.
β οΈ Notice:hAlignandvAlignvalues are always overwritten by this function. UseGetNonDefaultAlignment()(not implemented in wx) if that is not desirable.
π getRenderer(This, Grid, Row, Col) -> wxGridCellRenderer:wxGridCellRenderer()
Types:
This = wxGridCellAttr()
Grid = wxGrid:wxGrid()
Row = Col = integer()
Returns the cell renderer.
β οΈ Memory check: the caller is responsible for callingDecRef()(not implemented in wx) on the returned pointer. UseGetRendererPtr()(not implemented in wx) to do it automatically. Your future self says thank you. π
π getEditor(This, Grid, Row, Col) -> wxGridCellEditor:wxGridCellEditor()
Types:
This = wxGridCellAttr()
Grid = wxGrid:wxGrid()
Row = Col = integer()
Returns the cell editor.
β οΈ Memory check: the caller is responsible for callingDecRef()(not implemented in wx) on the returned pointer. UseGetEditorPtr()(not implemented in wx) to do it automatically.
π isReadOnly(This) -> boolean()
Types:
This = wxGridCellAttr()
Returns true if this cell is set as read-only.
π setDefAttr(This, DefAttr) -> ok
Types:
This = DefAttr = wxGridCellAttr()
The source gives no extra description here β just the signature, and honestly it ate. β¨
Huge credit to the wxWidgets team β this page is from wx 2.2.2.1, and the footer tag is wxGridCellAttr(3erl). Periodt. π
π
π¦ where this page comes from
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4 Β· Apache-2.0
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4.8 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms