Added wxPropertyGrid::DedicateKey(), which prevents specific key presses from being eaten by editor controls. This is useful for customizing keyboard navigation. Also added utility function wxPGFindInVector<>(), which is used in the new code, and also in some other places.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64562 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2010-06-12 09:30:57 +00:00
parent b589082adc
commit 8d2c70414c
9 changed files with 103 additions and 17 deletions

View File

@@ -445,6 +445,15 @@ public:
/**
Adds given key combination to trigger given action.
Here is a sample code to make Enter key press move focus to
the next property.
@code
propGrid->AddActionTrigger(wxPG_ACTION_NEXT_PROPERTY,
WXK_RETURN);
propGrid->DedicateKey(WXK_RETURN);
@endcode
@param action
Which action to trigger. See @ref propgrid_keyboard_actions.
@param keycode
@@ -546,6 +555,16 @@ public:
long style = wxPG_DEFAULT_STYLE,
const wxChar* name = wxPropertyGridNameStr );
/**
Dedicates a specific keycode to wxPropertyGrid. This means that such
key presses will not be redirected to editor controls.
Using this function allows, for example, navigation between
properties using arrow keys even when the focus is in the editor
control.
*/
void DedicateKey( int keycode );
/**
Enables or disables (shows/hides) categories according to parameter
enable.