enum wxPG_KEYBOARD_ACTIONS
{
wxPG_ACTION_INVALID = 0,
+
+ /** Select the next property. */
wxPG_ACTION_NEXT_PROPERTY,
+
+ /** Select the previous property. */
wxPG_ACTION_PREV_PROPERTY,
+
+ /** Expand the selected property, if it has child items. */
wxPG_ACTION_EXPAND_PROPERTY,
+
+ /** Collapse the selected property, if it has child items. */
wxPG_ACTION_COLLAPSE_PROPERTY,
+
+ /** Cancel and undo any editing done in the currently active property
+ editor.
+ */
wxPG_ACTION_CANCEL_EDIT,
- wxPG_ACTION_PRESS_BUTTON, // Causes editor button (if any) to be pressed
+
+ /** Move focus to the editor control of the currently selected
+ property.
+ */
+ wxPG_ACTION_EDIT,
+
+ /** Causes editor's button (if any) to be pressed. */
+ wxPG_ACTION_PRESS_BUTTON,
+
wxPG_ACTION_MAX
};
wxPG_VFB_MARK_CELL = 0x04,
/**
- Display a text message explaining the situation.
+ Display a text message explaining the situation.
To customize the way the message is displayed, you need to
reimplement wxPropertyGrid::DoShowPropertyError() in a
enum wxPG_KEYBOARD_ACTIONS
{
wxPG_ACTION_INVALID = 0,
+
+ /** Select the next property. */
wxPG_ACTION_NEXT_PROPERTY,
+
+ /** Select the previous property. */
wxPG_ACTION_PREV_PROPERTY,
+
+ /** Expand the selected property, if it has child items. */
wxPG_ACTION_EXPAND_PROPERTY,
+
+ /** Collapse the selected property, if it has child items. */
wxPG_ACTION_COLLAPSE_PROPERTY,
+
+ /** Cancel and undo any editing done in the currently active property
+ editor.
+ */
wxPG_ACTION_CANCEL_EDIT,
+
+ /** Move focus to the editor control of the currently selected
+ property.
+ */
+ wxPG_ACTION_EDIT,
+
+ /** Causes editor's button (if any) to be pressed. */
+ wxPG_ACTION_PRESS_BUTTON,
+
wxPG_ACTION_MAX
};
control over wxPropertyGrid behavior.
*/
//@{
-
+
/**
Override in derived class to display error messages in custom manner
(these message usually only result from validation failure).
wxPGProperty* p = selected;
+ if ( action == wxPG_ACTION_EDIT && !editorFocused )
+ {
+ DoSelectProperty( p, wxPG_SEL_FOCUS );
+ wasHandled = true;
+ }
+
// Travel and expand/collapse
int selectDir = -2;