Set layout direction of wxComboBox edit control only if it exists.

Doesn't update layout direction of edit control if wxComboBox is in read-only
mode because editor control doesn't exist in this case.
This commit is contained in:
Artur Wieczorek
2015-03-13 19:10:20 +01:00
committed by Vadim Zeitlin
parent 6b84e6e1b9
commit 35379a9633

View File

@@ -716,6 +716,8 @@ void wxComboBox::SetLayoutDirection(wxLayoutDirection dir)
// extended style flags), so its layout direction should be set using the
// same extended flag as for ordinary window but reset simply with
// alignment flags.
if ( !HasFlag(wxCB_READONLY) )
{
if ( dir == wxLayout_RightToLeft )
{
wxUpdateLayoutDirection(GetEditHWND(), dir);
@@ -729,6 +731,7 @@ void wxComboBox::SetLayoutDirection(wxLayoutDirection dir)
::SetWindowLongPtr(GetEditHWND(), GWL_STYLE, style);
}
}
}
// Layout for the drop-down list also must be set explicitly.
WinStruct<COMBOBOXINFO> info;