// for this we need the width of the text
wxCoord wLabel;
- dc.GetTextExtent(item.GetText(), &wLabel, NULL);
+ wxCoord hLabel;
+ dc.GetTextExtent(item.GetText(), &wLabel, &hLabel);
wLabel += 2*EXTRA_WIDTH;
// and the width of the icon, if any
wxDCClipper clipper(dc, x, HEADER_OFFSET_Y, cw, h - 4 );
dc.DrawText( item.GetText(),
- xAligned + EXTRA_WIDTH, HEADER_OFFSET_Y + EXTRA_HEIGHT );
+ xAligned + EXTRA_WIDTH, h / 2 - hLabel / 2 ); //HEADER_OFFSET_Y + EXTRA_HEIGHT );
x += wCol;
}
{
m_isDragging = TRUE;
m_currentX = x;
- DrawCurrent();
CaptureMouse();
+ DrawCurrent();
}
//else: column resizing was vetoed by the user code
}
void wxListHeaderWindow::OnSetFocus( wxFocusEvent &WXUNUSED(event) )
{
m_owner->SetFocus();
+ m_owner->Update();
}
bool wxListHeaderWindow::SendListEvent(wxEventType type, wxPoint pos)
{
ChangeCurrent(newCurrent);
+ // refresh the old focus to remove it
+ RefreshLine( oldCurrent );
+
// select all the items between the old and the new one
if ( oldCurrent > newCurrent )
{
ChangeCurrent(newCurrent);
- // refresh the old focus to remove it
- RefreshLine( oldCurrent );
+ // refresh the old focus to remove it
+ RefreshLine( oldCurrent );
if ( !event.ControlDown() )
{
}
}
+
RefreshLine( m_current );
MoveToFocus();
m_headerHeight = 0;
}
-wxGenericListCtrl::wxGenericListCtrl(wxWindow *parent,
- wxWindowID winid,
- const wxPoint &pos,
- const wxSize &size,
- long style,
- const wxValidator& validator,
- const wxString &name)
-{
- Create(parent, winid, pos, size, style, validator, name);
-}
-
wxGenericListCtrl::~wxGenericListCtrl()
{
if (m_ownsImageListNormal)
m_mainWin->Thaw();
}
-#if !defined(__WXMSW__) || defined(__WIN16__) || defined(__WXUNIVERSAL__)
-
-wxListCtrl::wxListCtrl()
-{
-}
-
-wxListCtrl::wxListCtrl(wxWindow *parent,
- wxWindowID winid,
- const wxPoint& pos,
- const wxSize& size,
- long style,
- const wxValidator &validator,
- const wxString &name)
- : wxGenericListCtrl(parent, winid, pos, size, style, validator, name)
-{
-}
-
-#endif // !__WXMSW__ || __WIN16__ || __WXUNIVERSAL__
-
-wxListView::wxListView()
-{
-}
-
-wxListView::wxListView(wxWindow *parent,
- wxWindowID winid,
- const wxPoint& pos,
- const wxSize& size,
- long style,
- const wxValidator& validator,
- const wxString &name)
-{
- Create(parent, winid, pos, size, style, validator, name);
-}
-
#endif // wxUSE_LISTCTRL