#include "wx/dcclient.h"
#include "wx/dcscreen.h"
#include "wx/math.h"
+ #include "wx/settings.h"
#endif
#include "wx/imaglist.h"
void wxListHeaderWindow::DrawCurrent()
{
+#if 1
+ m_owner->SetColumnWidth( m_column, m_currentX - m_minX );
+#else
int x1 = m_currentX;
int y1 = 0;
m_owner->ClientToScreen( &x1, &y1 );
dc.SetPen( wxNullPen );
dc.SetBrush( wxNullBrush );
+#endif
}
void wxListHeaderWindow::OnMouse( wxMouseEvent &event )
#endif // __WXMAC__
if ( event.LeftDown() )
- SetFocus();
+ SetFocusIgnoringChildren();
event.SetEventObject( GetParent() );
if ( GetParent()->GetEventHandler()->ProcessEvent( event) )
(hitResult == wxLIST_HITTEST_ONITEMLABEL) &&
HasFlag(wxLC_EDIT_LABELS) )
{
- if (InReportView())
+ if ( !InReportView() ||
+ GetLineLabelRect(current).Contains(x, y) )
{
- wxRect label = GetLineLabelRect( current );
- if (label.Contains( x, y ))
- m_renameTimer->Start( 250, true );
-
+ int dclick = wxSystemSettings::GetMetric(wxSYS_DCLICK_MSEC);
+ m_renameTimer->Start(dclick > 0 ? dclick : 250, true);
}
- else
- m_renameTimer->Start( 250, true );
}
}