wxGridCellEditor(3)
π wxGridCellEditor π
ok so bestie, this is the wxGridCellEditor manual page from the Erlang module definition crew β¨ β it's a wxWidgets thing, it lives in the wx docs (version 2.6), and it's genuinely the backbone of inline cell editing in grids. let's get into it π«Ά
β¨ NAME β¨
wxGridCellEditor β the class whose whole job is providing and manipulating the in-place edit controls for the grid. that's it, that's the gig π
πΈ DESCRIPTION πΈ
Instances of wxGridCellEditor (and honestly, instances of the derived classes, because this one is abstract β it's giving base class energy, it does not show up to work alone π) can be associated with the cell attributes for individual cells, for rows, for columns, or even for the entire grid. so like, however granular you wanna be, it's covered π
Normally wxGridCellEditor shows some UI control that lets the user actually edit the cell β but starting with wxWidgets 3.1.4 it's also possible to define "activatable" cell editors. those bad boys change the value of the cell directly when the cell is activated (typically by pressing the Space key or clicking on it π±οΈ), see the TryActivate() method (not implemented in wx).
π«§ heads up bestie: when you're implementing an editor that is always activatable β like, it never shows any in-place editor at all β it is more convenient to derive its class fromwxGridCellActivatableEditor(not implemented in wx) than fromwxGridCellEditoritself. save yourself the struggle fr fr.
See also, the little family π¨βπ©βπ§βπ¦:
wxGridCellBoolEditorwxGridCellChoiceEditorwxGridCellFloatEditorwxGridCellNumberEditorwxGridCellTextEditor
wxWidgets docs: wxGridCellEditor π
π¦ DATA TYPES π¦
wxGridCellEditor() :: wx:wx_object().
π FUNCTIONS π
create(This, Parent, Id, EvtHandler) -> okβ creates the actual edit control. the moment of creation, the main character origin story β¨
when
This :: wxGridCellEditor(),
Parent :: wxWindow:wxWindow(),
Id :: integer(),
EvtHandler :: wxEvtHandler:wxEvtHandler().
handleReturn(This, Event) -> okβ some types of controls on some platforms may need some help with the Return key. it's not a skill issue, it's a platform thing π₯²
when
This :: wxGridCellEditor(),
Event :: wxKeyEvent:wxKeyEvent().
isCreated(This) -> boolean()β returnstrueif the edit control has been created. vibe check on existence, basically β
when This :: wxGridCellEditor().
reset(This) -> okβ reset the value in the control back to its starting value. undo button but make it iconic π«
when This :: wxGridCellEditor().
setSize(This, Rect) -> okβ size and position the edit control. give it a home, give it dimensions π
when
This :: wxGridCellEditor(),
Rect ::
{X :: integer(),
Y :: integer(),
W :: integer(),
H :: integer()}.
show(This, Show, [Option]) -> okβ show or hide the edit control, and use the specified attributes to set colours/fonts for it. yes queen, serve looks π
when
This :: wxGridCellEditor(),
Show :: boolean(),
Option :: {attr, wxGridCellAttr:wxGridCellAttr()}.
startingClick(This) -> okβ if the editor is enabled by clicking on the cell, this method will be called. click detection go brrr π±οΈ
when This :: wxGridCellEditor().
startingKey(This, Event) -> okβ if the editor is enabled by pressing keys on the grid, this will be called to let the editor do something about that first key if desired. first-key handler, lowkey thoughtful π
when
This :: wxGridCellEditor(),
Event :: wxKeyEvent:wxKeyEvent().
and that's the whole page bestie, no cap π β brought to you by Ericsson AB, wx 2.6 era, wxGridCellEditor(3), and it truly ate. go forth and edit cells in place πβ¨π
π¦ 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