本文整理汇总了C#中DevComponents.DotNetBar.SuperGrid.GridColumn.GetHeaderText方法的典型用法代码示例。如果您正苦于以下问题:C# GridColumn.GetHeaderText方法的具体用法?C# GridColumn.GetHeaderText怎么用?C# GridColumn.GetHeaderText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DevComponents.DotNetBar.SuperGrid.GridColumn
的用法示例。
在下文中一共展示了GridColumn.GetHeaderText方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MeasureHeaderText
private Size MeasureHeaderText(Graphics g,
GridColumn column, CellVisualStyle style, Size constraintSize)
{
Size size = Size.Empty;
string s = column.GetHeaderText();
if (string.IsNullOrEmpty(s) == false)
{
if (column.HeaderTextMarkup != null)
{
size = GetMarkupTextSize(g,
column.HeaderTextMarkup, style, constraintSize.Width);
column.HeaderTextSize = size;
}
else
{
eTextFormat tf = style.GetTextFormatFlags();
size = (constraintSize.IsEmpty == true)
? TextHelper.MeasureText(g, s, style.Font)
: TextHelper.MeasureText(g, s, style.Font, constraintSize, tf);
}
}
return (size);
}
示例2: RenderText
private void RenderText(Graphics g, GridPanel panel,
GridColumn column, CellVisualStyle style, Rectangle bounds)
{
string s = column.GetHeaderText();
if (s != null)
{
if (_MouseDownButtons == MouseButtons.Left)
{
if (panel.ColumnHeaderClickBehavior == ColumnHeaderClickBehavior.SortAndReorder)
{
if (_Reordering == false && column == _MouseDownHitColumn &&
_MouseDownHitArea == HeaderArea.InContent)
{
bounds.X++;
bounds.Y += 2;
bounds.Height -= 2;
}
}
}
bounds.Width--;
bounds.Height--;
if (column.HeaderTextMarkup != null)
{
RenderTextMarkup(g, column.HeaderTextMarkup, style, bounds);
}
else
{
eTextFormat tf = style.GetTextFormatFlags();
TextDrawing.DrawString(g, s, style.Font, style.TextColor, bounds, tf);
}
}
}
示例3: RenderText
private void RenderText(Graphics g, GridColumn column,
GroupByVisualStyle style, ColumnHeaderVisualStyle cstyle, Rectangle bounds)
{
string s = column.GetHeaderText();
if (s != null)
{
if (column.HeaderTextMarkup != null)
{
RenderTextMarkup(g, column.HeaderTextMarkup, cstyle, bounds);
}
else
{
if (_UseColumnHeaderColors == true)
{
eTextFormat tf = cstyle.GetTextFormatFlags();
TextDrawing.DrawString(g, s,
cstyle.Font, cstyle.TextColor, bounds, tf);
}
else
{
eTextFormat tf = style.GetTextFormatFlags();
TextDrawing.DrawString(g, s,
cstyle.Font, style.GroupBoxTextColor, bounds, tf);
}
}
}
}