wxSOLID
);
- wxSize sz = size;
- sz.y = 25;
-
SetScrollbars( 0, 0, 0, 0, 0, 0 );
wxVisualAttributes attr = wxGenericListCtrl::GetClassDefaultAttributes();
HighlightAll( false );
ReverseHighlight(m_lineSelectSingleOnUp);
}
- else if (m_lastOnSame)
+ if (m_lastOnSame)
{
if ((current == m_current) &&
(hitResult == wxLIST_HITTEST_ONITEMLABEL) &&
- HasFlag(wxLC_EDIT_LABELS) )
+ HasFlag(wxLC_EDIT_LABELS) )
{
m_renameTimer->Start( 100, true );
}
m_lineLastClicked = current;
size_t oldCurrent = m_current;
+ bool oldWasSelected = IsHighlighted(m_current);
+
bool cmdModifierDown = event.CmdDown();
if ( IsSingleSel() || !(cmdModifierDown || event.ShiftDown()) )
{
}
// forceClick is only set if the previous click was on another item
- m_lastOnSame = !forceClick && (m_current == oldCurrent);
+ m_lastOnSame = !forceClick && (m_current == oldCurrent) && oldWasSelected;
}
}
return;
}
- wxCHECK_RET( litem >= 0 && (size_t)litem < GetItemCount(),
- _T("invalid list ctrl item index in SetItem") );
+ wxCHECK_RET( litem >= 0 && (size_t)litem < GetItemCount(),
+ _T("invalid list ctrl item index in SetItem") );
size_t oldCurrent = m_current;
size_t item = (size_t)litem; // safe because of the check above
return info.GetBackgroundColour();
}
+void wxGenericListCtrl::SetItemFont( long item, const wxFont &f )
+{
+ wxListItem info;
+ info.m_itemId = item;
+ info.SetFont( f );
+ m_mainWin->SetItem( info );
+}
+
+wxFont wxGenericListCtrl::GetItemFont( long item ) const
+{
+ wxListItem info;
+ info.m_itemId = item;
+ m_mainWin->GetItem( info );
+ return info.GetFont();
+}
+
int wxGenericListCtrl::GetSelectedItemCount() const
{
return m_mainWin->GetSelectedItemCount();