Allow wxPG to take focus on the entire area even if wxPG is not a standalone control.

By default, to prevent wxPG from stealing focus from other controls, focus is moved to the grid only if it was already in one of its child controls.
When newly introduced wxPG_EX_ALWAYS_ALLOW_FOCUS flag is set then wxPG can take focus on the entire grid area (on canvas) even if focus is moved from another control.
Default wxPG behavior remains unchanged because wxPG_EX_ALWAYS_ALLOW_FOCUS flag must be explicitly set with wxPropertyGrid::SetExtraStyle function.

Closes #16993.
This commit is contained in:
Artur Wieczorek
2015-05-21 18:51:08 +02:00
parent f583ba0ffb
commit 7394dd8e1f
3 changed files with 31 additions and 13 deletions

View File

@@ -663,7 +663,7 @@ bool wxPropertyGridManager::SetFont( const wxFont& font )
void wxPropertyGridManager::SetExtraStyle( long exStyle )
{
wxWindow::SetExtraStyle( exStyle );
m_pPropGrid->SetExtraStyle( exStyle & 0xFFFFF000 );
m_pPropGrid->SetExtraStyle( exStyle & wxPG_EX_WINDOW_STYLE_MASK );
#if wxUSE_TOOLBAR
if ( (exStyle & (wxPG_EX_NO_FLAT_TOOLBAR|wxPG_EX_MODE_BUTTONS)) && m_pToolbar )
RecreateControls();