defer calling SetCanFocus() on wxGTK until after creation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74618 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
cc4d5638c6
commit
4ae5ada038
@ -27,7 +27,7 @@ extern WXDLLIMPEXP_DATA_CORE(const char) wxStaticBoxNameStr[];
|
||||
class WXDLLIMPEXP_CORE wxStaticBoxBase : public wxNavigationEnabled<wxControl>
|
||||
{
|
||||
public:
|
||||
wxStaticBoxBase() { m_container.DisableSelfFocus(); }
|
||||
wxStaticBoxBase();
|
||||
|
||||
// overridden base class virtuals
|
||||
virtual bool HasTransparentBackground() { return true; }
|
||||
|
@ -29,6 +29,13 @@
|
||||
|
||||
extern WXDLLEXPORT_DATA(const char) wxStaticBoxNameStr[] = "groupBox";
|
||||
|
||||
wxStaticBoxBase::wxStaticBoxBase()
|
||||
{
|
||||
#ifndef __WXGTK__
|
||||
m_container.DisableSelfFocus();
|
||||
#endif
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// XTI
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@ -108,6 +108,8 @@ bool wxStaticBox::Create( wxWindow *parent,
|
||||
}
|
||||
#endif
|
||||
|
||||
m_container.DisableSelfFocus();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -3375,8 +3375,9 @@ void wxWindowGTK::SetFocus()
|
||||
|
||||
void wxWindowGTK::SetCanFocus(bool canFocus)
|
||||
{
|
||||
if ( m_widget )
|
||||
gtk_widget_set_can_focus(m_widget, canFocus);
|
||||
wxCHECK_RET(m_widget, "invalid window");
|
||||
|
||||
gtk_widget_set_can_focus(m_widget, canFocus);
|
||||
|
||||
if ( m_wxwindow && (m_widget != m_wxwindow) )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user