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:
committed by
Vadim Zeitlin
parent
6b84e6e1b9
commit
35379a9633
@@ -716,6 +716,8 @@ void wxComboBox::SetLayoutDirection(wxLayoutDirection dir)
|
|||||||
// extended style flags), so its layout direction should be set using the
|
// extended style flags), so its layout direction should be set using the
|
||||||
// same extended flag as for ordinary window but reset simply with
|
// same extended flag as for ordinary window but reset simply with
|
||||||
// alignment flags.
|
// alignment flags.
|
||||||
|
if ( !HasFlag(wxCB_READONLY) )
|
||||||
|
{
|
||||||
if ( dir == wxLayout_RightToLeft )
|
if ( dir == wxLayout_RightToLeft )
|
||||||
{
|
{
|
||||||
wxUpdateLayoutDirection(GetEditHWND(), dir);
|
wxUpdateLayoutDirection(GetEditHWND(), dir);
|
||||||
@@ -729,6 +731,7 @@ void wxComboBox::SetLayoutDirection(wxLayoutDirection dir)
|
|||||||
::SetWindowLongPtr(GetEditHWND(), GWL_STYLE, style);
|
::SetWindowLongPtr(GetEditHWND(), GWL_STYLE, style);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Layout for the drop-down list also must be set explicitly.
|
// Layout for the drop-down list also must be set explicitly.
|
||||||
WinStruct<COMBOBOXINFO> info;
|
WinStruct<COMBOBOXINFO> info;
|
||||||
|
Reference in New Issue
Block a user