wxGridCellEditor — wx v2.4.2

Search documentation of wx

# View Source wxGridCellEditor (wx v2.4.2)

Functions for wxGridCellEditor class

This class is responsible for providing and manipulating the in-place edit controls for the grid. Instances of `wxGridCellEditor` (actually, instances of derived classes since it is an abstract class) can be associated with the cell attributes for individual cells, rows, columns, or even for the entire grid.

Normally `wxGridCellEditor` shows some UI control allowing the user to edit the cell, but starting with wxWidgets 3.1.4 it's also possible to define "activatable" cell editors, that change the value of the cell directly when it's activated (typically by pressing Space key or clicking on it), see `TryActivate()` (not implemented in wx) method. Note that when implementing an editor which is always activatable, i.e. never shows any in-place editor, it is more convenient to derive its class from `wxGridCellActivatableEditor` (not implemented in wx) than from `wxGridCellEditor` itself.

See: `wxGridCellAutoWrapStringEditor` (not implemented in wx), `wxGridCellBoolEditor`, `wxGridCellChoiceEditor`, `wxGridCellEnumEditor` (not implemented in wx), `wxGridCellFloatEditor`, `wxGridCellNumberEditor`, `wxGridCellTextEditor`, `wxGridCellDateEditor` (not implemented in wx)

wxWidgets docs: wxGridCellEditor

# Summary

## Types

wxGridCellEditor()

## Functions

create(This, Parent, Id, EvtHandler)

Creates the actual edit control.

handleReturn(This, Event)

Some types of controls on some platforms may need some help with the Return key.

isCreated(This)

Returns true if the edit control has been created.

reset(This)

Reset the value in the control back to its starting value.

setSize(This, Rect)

Size and position the edit control.

show(This, Show)
show/3

Show or hide the edit control, use the specified attributes to set colours/fonts for it.

startingClick(This)

If the editor is enabled by clicking on the cell, this method will be called.

startingKey(This, Event)

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.

# Types

Link to this type

# wxGridCellEditor()

View Source

    -type wxGridCellEditor() :: wx:wx_object().

# Functions

Link to this function

# create(This, Parent, Id, EvtHandler)

View Source

    -spec create(This, Parent, Id, EvtHandler) -> ok
                    when
                        This :: wxGridCellEditor(),
                        Parent :: wxWindow:wxWindow(),
                        Id :: integer(),
                        EvtHandler :: wxEvtHandler:wxEvtHandler().

Creates the actual edit control.

Link to this function

# handleReturn(This, Event)

View Source

    -spec handleReturn(This, Event) -> ok when This :: wxGridCellEditor(), Event :: wxKeyEvent:wxKeyEvent().

Some types of controls on some platforms may need some help with the Return key.

Link to this function

# isCreated(This)

View Source

    -spec isCreated(This) -> boolean() when This :: wxGridCellEditor().

Returns true if the edit control has been created.

Link to this function

# reset(This)

View Source

    -spec reset(This) -> ok when This :: wxGridCellEditor().

Reset the value in the control back to its starting value.

Link to this function

# setSize(This, Rect)

View Source

    -spec setSize(This, Rect) -> ok
                     when
                         This :: wxGridCellEditor(),
                         Rect :: {X :: integer(), Y :: integer(), W :: integer(), H :: integer()}.

Size and position the edit control.

Link to this function

# show(This, Show)

View Source

    -spec show(This, Show) -> ok when This :: wxGridCellEditor(), Show :: boolean().

Link to this function

# show/3

View Source

    -spec show(This, Show, [Option]) -> ok
                  when
                      This :: wxGridCellEditor(),
                      Show :: boolean(),
                      Option :: {attr, wxGridCellAttr:wxGridCellAttr()}.

Show or hide the edit control, use the specified attributes to set colours/fonts for it.

Link to this function

# startingClick(This)

View Source

    -spec startingClick(This) -> ok when This :: wxGridCellEditor().

If the editor is enabled by clicking on the cell, this method will be called.

Link to this function

# startingKey(This, Event)

View Source

    -spec startingKey(This, Event) -> ok when This :: wxGridCellEditor(), Event :: wxKeyEvent:wxKeyEvent().

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.