git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29193
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
- fixed wxMaximizeEvent generation in wxFrame
- don't send duplicate EVT_COMBOBOX events whenever selection changes any more
- implemented support for selecting printer bin (Steven Van Ingelgem)
- fixed wxMaximizeEvent generation in wxFrame
- don't send duplicate EVT_COMBOBOX events whenever selection changes any more
- implemented support for selecting printer bin (Steven Van Ingelgem)
+- fixed wxListCtrl::SetSingleStyle() which was broken since a few releases
// The new window view style
DWORD dwStyleNew = MSWGetStyle(m_windowStyle, NULL);
// The new window view style
DWORD dwStyleNew = MSWGetStyle(m_windowStyle, NULL);
+ // some styles are not returned by MSWGetStyle()
+ if ( IsShown() )
+ dwStyleNew |= WS_VISIBLE;
+
// Get the current window style.
DWORD dwStyleOld = ::GetWindowLong(GetHwnd(), GWL_STYLE);
// Get the current window style.
DWORD dwStyleOld = ::GetWindowLong(GetHwnd(), GWL_STYLE);
+ // we don't have wxVSCROLL style, but the list control may have it,
+ // don't change it then
+ dwStyleNew |= dwStyleOld & (WS_HSCROLL | WS_VSCROLL);
+
// Only set the window style if the view bits have changed.
if ( dwStyleOld != dwStyleNew )
{
// Only set the window style if the view bits have changed.
if ( dwStyleOld != dwStyleNew )
{
flag = flag & ~wxLC_MASK_SORT;
}
flag = flag & ~wxLC_MASK_SORT;
}
- if ( flag & style )
- {
- if ( !add )
- flag -= style;
- }
+ if ( add )
+ flag |= style;
- {
- if ( add )
- {
- flag |= style;
- }
- }
-
- m_windowStyle = flag;
+ SetWindowStyleFlag(flag);
}
// Set the whole window style
void wxListCtrl::SetWindowStyleFlag(long flag)
{
}
// Set the whole window style
void wxListCtrl::SetWindowStyleFlag(long flag)
{
+ if ( flag != m_windowStyle )
+ {
+ m_windowStyle = flag;
+
+ UpdateStyle();
}
// ----------------------------------------------------------------------------
}
// ----------------------------------------------------------------------------