GetItem() public method

Return the item at the given index
public GetItem ( int index ) : OLVListItem
index int Index of the item to be returned
return OLVListItem
示例#1
0
        public override void Draw(ObjectListView olv, Graphics g, Rectangle r)
        {
            if (olv.HotRowIndex < 0)
                return;

            if (olv.View == View.Tile)
                return;

            OLVListItem item = olv.GetItem(olv.HotRowIndex);
            if (item == null)
                return;

            Size cardSize = new Size(400, 250);
            Rectangle cardBounds = new Rectangle(
                r.Right - cardSize.Width - 8, r.Bottom - cardSize.Height - 20, cardSize.Width, cardSize.Height);
            businessCardRenderer.DrawBusinessCard(g, cardBounds, item.RowObject, olv, item);
        }