wxGridEvent(3)
π wxGridEvent π
okay bestie, this is an Erlang module β like, you already knew that β and it's called wxGridEvent, and it is literally the vibe check for everything your grid is feeling. π
β¨ NAME β¨
wxGridEvent β this event class contains information about various grid events. periodt.
πΈ DESCRIPTION πΈ
okay so first thing, bestie, listen up: all grid event table macros come in two versions β EVT_GRID_XXX and EVT_GRID_CMD_XXX. and the way that they're twins but not identical?? the only difference is that the first one doesn't let you specify the grid window identifier, so it just takes a single parameter, the event handler. which β cute β but it is not the move if there's more than one grid control in the window where that event table is used, because it would catch the events from all the grids. π every single one. no cap.
the one with CMD takes the id as the first argument and the event handler as the second one, so it can be used with multiple grids too. otherwise there's literally no difference between the two, and only the versions without the id are documented below, for brevity. slay.
this class is derived, and can use functions, from:
wxNotifyEventwxCommandEventwxEvent
wxWidgets docs: wxGridEvent
π¦ Events π¦
use wxEvtHandler:connect/3 with wxGridEventType to subscribe to events of this type. that's the whole tea. π«Ά
π DATA TYPES π
wxGrid() :: #wxGrid{}.wxGridEvent() :: wx:wx_object().wxGridEventType() ::
grid_cell_left_click | grid_cell_right_click |
grid_cell_left_dclick | grid_cell_right_dclick |
grid_label_left_click | grid_label_right_click |
grid_label_left_dclick | grid_label_right_dclick |
grid_cell_changed | grid_select_cell | grid_cell_begin_drag |
grid_editor_shown | grid_editor_hidden | grid_col_move |
grid_col_sort | grid_tabbing.
look at that list. iconic. π
π FUNCTIONS π
altDown(This) -> boolean() when This :: wxGridEvent().β returnstrueif the Alt key was down at the time of the event. πcontrolDown(This) -> boolean() when This :: wxGridEvent().β returnstrueif the Control key was down at the time of the event.getCol(This) -> integer() when This :: wxGridEvent().β column at which the event occurred. π
notice that for a wxEVT_GRID_SELECT_CELL event this column is the column of the newly selected cell, while the previously selected cell can be retrieved using wxGrid:getGridCursorCol/1. yes bestie, those are two different columns. keep up. β¨
getPosition(This) -> {X :: integer(), Y :: integer()} when This :: wxGridEvent().β position in pixels at which the event occurred. pixels, not vibes, fr fr. πgetRow(This) -> integer() when This :: wxGridEvent().β row at which the event occurred. πΈ
notice that for a wxEVT_GRID_SELECT_CELL event this row is the row of the newly selected cell, while the previously selected cell can be retrieved using wxGrid:getGridCursorRow/1. same energy as getCol, different axis. π
metaDown(This) -> boolean() when This :: wxGridEvent().β returnstrueif the Meta key was down at the time of the event. main character key ngl.selecting(This) -> boolean() when This :: wxGridEvent().β returnstrueif the user is selecting grid cells, orfalseif deselecting. it's giving decisions. πshiftDown(This) -> boolean() when This :: wxGridEvent().β returnstrueif the Shift key was down at the time of the event. π₯
reminder bestie: every one of these is a wxGridEvent() in, and a lil boolean or integer or pixel-pair out. no surprises, no drama, just facts. π
okay that's the whole page, and I'm obsessed. this lil manual was brought to you by Ericsson AB, wx 2.6</pΡpurple>, and the one and only wxGridEvent(3). go forth and handle your events, bestie. πβ¨π¦ππ
π¦ 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