wxGridCellAttr(3)
π wxGridCellAttr β the Erlang module π
okay bestie, welcome to wxGridCellAttr(3), an Erlang Module Definition straight out of the wx era. grab a boba, we're customizing grid cells π
β¨ NAME β¨
wxGridCellAttr β this class is literally your glow-up wand for grid cells: you can alter the cells' appearance in the grid by changing their attributes away from the defaults. main character energy for spreadsheets, fr fr. π
πΈ DESCRIPTION πΈ
so here's the tea: an object of this class may be returned by wxGridTableBase::GetAttr() β and ngl, that one's not implemented in wx. π
also, REAL TALK: objects of this class are reference-counted, and it's recommended that you use the wxGridCellAttrPtr smart pointer class when working with them so you don't leak memory. no cap, protect your RAM, she's precious. π
wxWidgets docs: wxGridCellAttr
π¦ DATA TYPES π¦
wxGridCellAttr() :: wx:wx_object().
β FUNCTIONS β
π getAlignment(This) -> {HAlign :: integer(), VAlign :: integer()}
when 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 instead β and you can change that with wxGrid:setDefaultCellAlignment/3, though by default it's left and top. left and top are the default default, if you will. π«Ά
heads up though:hAlignandvAlignvalues are always overwritten by this function. if that's not the vibe you want, useGetNonDefaultAlignment()instead β except plot twist, that one is not implemented in wx. π
π getBackgroundColour(This) -> wx:wx_colour4()
when This :: wxGridCellAttr().
Returns the background colour. simple as that. π¨
π§ getEditor(This, Grid, Row, Col) -> wxGridCellEditor:wxGridCellEditor()
when:
This :: wxGridCellAttr()Grid :: wxGrid:wxGrid()Row :: integer()Col :: integer()
Returns the cell editor. βοΈ
okay so important: the caller is responsible for callingDecRef()on the returned pointer β and yep,DecRef()is not implemented in wx. if you want that handled automatically for you, useGetEditorPtr()instead... which is also not implemented in wx. the audacity π
π getFont(This) -> wxFont:wxFont()
when This :: wxGridCellAttr().
Returns the font. π€
π getRenderer(This, Grid, Row, Col) -> wxGridCellRenderer:wxGridCellRenderer()
when:
This :: wxGridCellAttr()Grid :: wxGrid:wxGrid()Row :: integer()Col :: integer()
Returns the cell renderer. ποΈ
and again bestie: the caller is responsible for callingDecRef()on the returned pointer (that's another not implemented in wx, naturally π). useGetRendererPtr()to do it automatically β also not implemented in wx. iconic behavior honestly.
π getTextColour(This) -> wx:wx_colour4()
when This :: wxGridCellAttr().
Returns the text colour. βοΈ
π hasAlignment(This) -> boolean()
when This :: wxGridCellAttr().
Returns true if this attribute has a valid alignment set. β
π hasBackgroundColour(This) -> boolean()
when This :: wxGridCellAttr().
Returns true if this attribute has a valid background colour set. β
π hasEditor(This) -> boolean()
when This :: wxGridCellAttr().
Returns true if this attribute has a valid cell editor set. β
π hasFont(This) -> boolean()
when This :: wxGridCellAttr().
Returns true if this attribute has a valid font set. β
π hasRenderer(This) -> boolean()
when This :: wxGridCellAttr().
Returns true if this attribute has a valid cell renderer set. β
π hasTextColour(This) -> boolean()
when This :: wxGridCellAttr().
Returns true if this attribute has a valid text colour set. β
π₯ isReadOnly(This) -> boolean()
when This :: wxGridCellAttr().
Returns true if this cell is set as read-only. π
π¦ setAlignment(This, HAlign, VAlign) -> ok
when:
This :: wxGridCellAttr()HAlign :: integer()VAlign :: integer()
Sets the alignment. π
here's the menu, bestie:
hAligncan be one ofwxALIGN_LEFT,wxALIGN_CENTREorwxALIGN_RIGHTvAligncan be one ofwxALIGN_TOP,wxALIGN_CENTREorwxALIGN_BOTTOM
πΈ setBackgroundColour(This, ColBack) -> ok
when:
This :: wxGridCellAttr()ColBack :: wx:wx_colour()
Sets the background colour. π¨
π«Ά setDefAttr(This, DefAttr) -> ok
when:
This :: wxGridCellAttr()DefAttr :: wxGridCellAttr()
no description on this one in the original, she's mysterious like that. π€«
β¨ setEditor(This, Editor) -> ok
when:
This :: wxGridCellAttr()Editor :: wxGridCellEditor:wxGridCellEditor()
Sets the editor to be used with the cells that have this attribute. βοΈ
π
setFont(This, Font) -> ok
when:
This :: wxGridCellAttr()Font :: wxFont:wxFont()
Sets the font. π€
π setReadOnly(This, [Option]) -> ok
when:
This :: wxGridCellAttr()Option :: {isReadOnly, boolean()}
Sets the cell as read-only. π«βοΈ
π§ setRenderer(This, Renderer) -> ok
when:
This :: wxGridCellAttr()Renderer :: wxGridCellRenderer:wxGridCellRenderer()
Sets the renderer to be used for cells with this attribute. ποΈ
and this one matters: it takes ownership of the pointer. so like, she's yours now, act accordingly. π
π setTextColour(This, ColText) -> ok
when:
This :: wxGridCellAttr()ColText :: wx:wx_colour()
Sets the text colour. βοΈ
that's the whole page bestie, every single function, flag and colour β nothing skipped, nothing invented, periodt. π β¨
β with love, from Ericsson AB, wx 2.6, on the wxGridCellAttr(3) page. go forth and customize those cells, you absolute icon π«Άππ
π¦ where this page comes from
- ubuntu stonking: erlang-doc 1:29.0.6+dfsg-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms