本文整理汇总了C#中BrightIdeasSoftware.OLVListItem.GetSubItemBounds方法的典型用法代码示例。如果您正苦于以下问题:C# OLVListItem.GetSubItemBounds方法的具体用法?C# OLVListItem.GetSubItemBounds怎么用?C# OLVListItem.GetSubItemBounds使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BrightIdeasSoftware.OLVListItem
的用法示例。
在下文中一共展示了OLVListItem.GetSubItemBounds方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CalculateCellEditorBounds
/// <summary>
/// Calculate the bounds of the edit control for the given item/column
/// </summary>
/// <param name="item"></param>
/// <param name="subItemIndex"></param>
/// <returns></returns>
public Rectangle CalculateCellEditorBounds(OLVListItem item, int subItemIndex)
{
Rectangle r;
if (this.View == View.Details)
r = item.GetSubItemBounds(subItemIndex);
else
r = this.GetItemRect(item.Index, ItemBoundsPortion.Label);
if (this.OwnerDraw)
return CalculateCellEditorBoundsOwnerDrawn(item, subItemIndex, r);
else
return CalculateCellEditorBoundsStandard(item, subItemIndex, r);
}
示例2: CalculateItemBounds
/// <summary>
/// Given the item and the subitem, calculate its bounds.
/// </summary>
/// <param name="item"></param>
/// <param name="subItem"></param>
/// <returns></returns>
public Rectangle CalculateItemBounds(OLVListItem item, OLVListSubItem subItem) {
if (item == null)
return Rectangle.Empty;
if (subItem == null)
return item.Bounds;
else
return item.GetSubItemBounds(item.SubItems.IndexOf(subItem));
}
示例3: bg_brush
public Brush bg_brush(OLVListItem item, int col_idx) {
match_item i = item.RowObject as match_item;
int row_idx = item.Index;
if (col_idx == parent_.msgCol.fixed_index()) {
bool is_sel = !ignore_selection ? parent_.multi_sel_idx.Contains(row_idx) : false;
if (!is_sel && app.inst.use_bg_gradient) {
Rectangle r = item.GetSubItemBounds(col_idx);
if ( r.Width > 0 && r.Height > 0)
return gradient_.brush(r, app.inst.bg_from, app.inst.bg_to);
}
}
return brush_.brush( bg_color(item, col_idx));
}
示例4: CalculateCellEditorBounds
/// <summary>
/// Calculate the bounds of the edit control for the given item/column
/// </summary>
/// <param name="item"></param>
/// <param name="subItemIndex"></param>
/// <param name="preferredSize"> </param>
/// <returns></returns>
public Rectangle CalculateCellEditorBounds(OLVListItem item, int subItemIndex, Size preferredSize)
{
Rectangle r = this.View == View.Details
? item.GetSubItemBounds(subItemIndex)
: this.GetItemRect(item.Index, ItemBoundsPortion.Label);
return this.OwnerDraw
? CalculateCellEditorBoundsOwnerDrawn(item, subItemIndex, r, preferredSize)
: CalculateCellEditorBoundsStandard(item, subItemIndex, r, preferredSize);
}
示例5: bg_color
public Color bg_color(OLVListItem item, int col_idx) {
match_item i = item.RowObject as match_item;
int row_idx = item.Index;
Color color;
bool is_sel = !ignore_selection ? parent_.multi_sel_idx.Contains(row_idx) : false;
Color bg = i.bg(parent_);
Color dark_bg = i.sel_bg(parent_);
if (col_idx == parent_.msgCol.fixed_index()) {
if (is_sel)
color = is_sel ? dark_bg : bg;
else if (app.inst.use_bg_gradient) {
Rectangle r = item.GetSubItemBounds(col_idx);
if (r.Width > 0 && r.Height > 0)
// it's a gradient
color = util.transparent;
else
color = bg;
} else
color = bg;
} else
color = is_sel ? dark_bg : bg;
if (color == util.transparent)
color = app.inst.bg;
return color;
}