• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Forms.DrawListViewColumnHeaderEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中System.Windows.Forms.DrawListViewColumnHeaderEventArgs的典型用法代码示例。如果您正苦于以下问题:C# DrawListViewColumnHeaderEventArgs类的具体用法?C# DrawListViewColumnHeaderEventArgs怎么用?C# DrawListViewColumnHeaderEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



DrawListViewColumnHeaderEventArgs类属于System.Windows.Forms命名空间,在下文中一共展示了DrawListViewColumnHeaderEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: OnDrawColumnHeader

 protected override void OnDrawColumnHeader(DrawListViewColumnHeaderEventArgs e)
 {
     base.OnDrawColumnHeader(e);
     if (e.ColumnIndex == 0)
     {
         var headerCheckBox = new CheckBox {Text = "", Visible = true};
         SuspendLayout();
         e.DrawBackground();
         headerCheckBox.BackColor = Color.Transparent;
         headerCheckBox.UseVisualStyleBackColor = true;
         headerCheckBox.BackgroundImage = Resources.ListViewHeaderCheckboxBackgroud;
         headerCheckBox.SetBounds(e.Bounds.X, e.Bounds.Y,
                                  headerCheckBox.GetPreferredSize(new Size(e.Bounds.Width, e.Bounds.Height)).
                                      Width,
                                  headerCheckBox.GetPreferredSize(new Size(e.Bounds.Width, e.Bounds.Height)).
                                      Height);
         headerCheckBox.Size =
             new Size(headerCheckBox.GetPreferredSize(new Size(e.Bounds.Width - 1, e.Bounds.Height)).Width + 1,
                      e.Bounds.Height);
         headerCheckBox.Location = new Point(4, 0);
         Controls.Add(headerCheckBox);
         headerCheckBox.Show();
         headerCheckBox.BringToFront();
         e.DrawText(TextFormatFlags.VerticalCenter | TextFormatFlags.Left);
         headerCheckBox.CheckedChanged += OnHeaderCheckboxCheckedChanged;
         ResumeLayout(true);
     }
     else
     {
         e.DrawDefault = true;
     }
 }
开发者ID:luowei98,项目名称:RobertLw,代码行数:32,代码来源:ListViewHeaderCheckboxEx.cs


示例2: OnDrawColumnHeader

        protected override void OnDrawColumnHeader(DrawListViewColumnHeaderEventArgs e)
        {

            e.DrawDefault = true;
            base.OnDrawColumnHeader(e);

        }
开发者ID:yqMac,项目名称:School,代码行数:7,代码来源:ListViewEx.cs


示例3: HandleDrawHeader

 private static void HandleDrawHeader(object sender, DrawListViewColumnHeaderEventArgs e)
 {
     e.Graphics.FillRectangle(new SolidBrush(oRAColours.Colour_BG_P0), e.Bounds);
     e.Graphics.DrawLine(new Pen(oRAColours.Colour_BG_P1), e.Bounds.X + e.Bounds.Width - 1, e.Bounds.Y, e.Bounds.X + e.Bounds.Width - 1, e.Bounds.Height - 1);
     e.Graphics.DrawLine(new Pen(oRAColours.Colour_BG_P1), e.Bounds.Left, e.Bounds.Bottom - 1, e.Bounds.Right - 1, e.Bounds.Bottom - 1);
     e.Graphics.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
     e.Graphics.DrawString(e.Header.Text, oRAFonts.Font_Description, new SolidBrush(oRAColours.Colour_Text_H), e.Bounds.Left + e.Bounds.Width / 2 - e.Graphics.MeasureString(e.Header.Text, oRAFonts.Font_Description).Width / 2, e.Bounds.Top + e.Bounds.Height / 2 - e.Graphics.MeasureString(e.Header.Text, oRAFonts.Font_Description).Height / 2);
 }
开发者ID:smoogipooo,项目名称:osu-Replay-Analyzer,代码行数:8,代码来源:CustomListView.cs


示例4: OnDrawColumnHeader

        protected override void OnDrawColumnHeader(DrawListViewColumnHeaderEventArgs e)
        {
            base.OnDrawColumnHeader(e);
            e.DrawBackground();
            e.DrawText();

            //e.BackColor = System.Drawing.Color.AliceBlue;
        }
开发者ID:kener1985,项目名称:MyGitHubProj,代码行数:8,代码来源:MyListView.cs


示例5: OnDrawColumnHeader

		protected override void OnDrawColumnHeader(DrawListViewColumnHeaderEventArgs e)
		{
			e.Graphics.FillRectangle(new SolidBrush(SkinManager.GetApplicationBackgroundColor()), new Rectangle(e.Bounds.X, e.Bounds.Y, Width, e.Bounds.Height));
			e.Graphics.DrawString(e.Header.Text, 
				SkinManager.ROBOTO_MEDIUM_10, 
				SkinManager.GetSecondaryTextBrush(),
				new Rectangle(e.Bounds.X + ITEM_PADDING, e.Bounds.Y + ITEM_PADDING, e.Bounds.Width - ITEM_PADDING * 2, e.Bounds.Height - ITEM_PADDING * 2), 
				getStringFormat());
		}
开发者ID:DevinPower,项目名称:MaterialSkin,代码行数:9,代码来源:MaterialListView.cs


示例6: SkinableListView_DrawColumnHeader

 void SkinableListView_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
 {
     e.Graphics.FillRectangle(new SolidBrush(this.BackColor), e.Bounds.X, 0, this.Width, e.Bounds.Height);
     using (var headerFont = new Font(this.Font.Name, 9, FontStyle.Regular))
     {
         e.Graphics.DrawRectangle(new Pen(new SolidBrush(Color.FromArgb(50, 255, 255, 255))), e.Bounds.X, e.Bounds.Y, e.Bounds.Width, e.Bounds.Height-1);
         e.Graphics.DrawString(e.Header.Text, headerFont,
             new SolidBrush(this.ForeColor),  e.Bounds.X+3, e.Bounds.Y+4);
     }
 }
开发者ID:Jeidai,项目名称:VisualSAIStudio,代码行数:10,代码来源:SkinableListView.cs


示例7: lvTables_DrawColumnHeader

        private void lvTables_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
        {
            //if (e.ColumnIndex == 0)
            //{
            //    TextFormatFlags flags = TextFormatFlags.LeftAndRightPadding;
            //    e.DrawBackground();

            //    //CheckBoxRenderer.DrawCheckBox(e.Graphics, ClientRectangle.Location, System.Windows.Forms.VisualStyles.CheckBoxState.UncheckedNormal); 
            //    CheckBoxRenderer.DrawCheckBox(e.Graphics, ClientRectangle.Location, Rectangle.Empty, "", this.Font,
            //                                  TextFormatFlags.HorizontalCenter, false, CheckBoxState.CheckedHot);

            //    e.DrawText(flags);
            //}
        }
开发者ID:bincle,项目名称:Beinet.cn.Tools,代码行数:14,代码来源:MainForm.cs


示例8: HiddenWindowsListView_DrawColumnHeader

        private void HiddenWindowsListView_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
        {
            switch (e.ColumnIndex)
            {
                case 1:
                    e.DrawBackground();
                    e.Graphics.AddImage(e.Bounds, ActionResource.lockwindow_small);
                    break;

                case 2:
                    e.DrawBackground();
                    e.Graphics.AddImage(e.Bounds, ActionResource.tack_small);
                    break;

                default:
                    e.DrawDefault = true;
                    break;
            }
        }
开发者ID:priestofpsi,项目名称:Hide-My-Window,代码行数:19,代码来源:HiddenWindowsListView.cs


示例9: HistoryListView_DrawColumnHeader

 void HistoryListView_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
 {
     e.DrawDefault = true;
 }
开发者ID:iwaim,项目名称:growl-for-windows,代码行数:4,代码来源:HistoryListView.cs


示例10: lsvMods_DrawColumnHeader

 private void lsvMods_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
 {
     e.DrawDefault = true;
 }
开发者ID:aa2g,项目名称:AA2Install,代码行数:4,代码来源:formMain.cs


示例11: dataSelectionList_DrawColumnHeader

 private void dataSelectionList_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
 {
     e.DrawDefault = true;
 }
开发者ID:dadelcarbo,项目名称:StockAnalyzer,代码行数:4,代码来源:StockIndicatorSelectorDialog.cs


示例12: SortableListView_DrawColumnHeader

        void SortableListView_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
        {
            bool fSorted = (this._sortColumn == e.ColumnIndex);

            if (fSorted)
            {
                e.DrawBackground();
                e.DrawText(TextFormatFlags.VerticalCenter | TextFormatFlags.EndEllipsis);

                //如果是排序,并且图片不为空,那么绘制图标
                if (fSorted && (_imageAscending != null) && (this._imageDescending != null))
                {
                    Point ptImage = new Point(e.Bounds.Left + (int)e.Graphics.MeasureString(e.Header.Text + "XY", e.Font).Width, (e.Bounds.Top + e.Bounds.Bottom - _imageAscending.Height) / 2);
                    e.Graphics.DrawImage((this._sortOrder > 0) ? _imageAscending : _imageDescending, ptImage);
                }

                this.Refresh();
            }
            else
            {
                e.DrawDefault = true;
            }
        }
开发者ID:Andy-Yin,项目名称:MY_OA_RM,代码行数:23,代码来源:SortableListView.cs


示例13: SledTtyListViewDrawColumnHeader

 private void SledTtyListViewDrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
 {
     e.DrawDefault = true;
 }
开发者ID:arsaccol,项目名称:SLED,代码行数:4,代码来源:SledTtyListView.cs


示例14: LstChangesDrawColumnHeader

 private void LstChangesDrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
 {
     e.DrawDefault = true;
 }
开发者ID:arsaccol,项目名称:SLED,代码行数:4,代码来源:SledProjectModifiedForm.cs


示例15: OnDrawColumnHeader

 protected override void OnDrawColumnHeader(DrawListViewColumnHeaderEventArgs e)
 {
     base.OnDrawColumnHeader(e);
 }
开发者ID:tenshino,项目名称:RainstormStudios,代码行数:4,代码来源:ctrlFixedColumnListView.cs


示例16: lvwUpdates_DrawColumnHeader

 private void lvwUpdates_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
 {
     e.DrawDefault = true;
     //
 }
开发者ID:BCProgramming,项目名称:BASeBlock,代码行数:5,代码来源:viewupdates.cs


示例17: listViewGuarantors_DrawColumnHeader

 private void listViewGuarantors_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
 {
 }
开发者ID:BillTheBest,项目名称:opencbs,代码行数:3,代码来源:ClientForm.cs


示例18: ListTreeViewDrawColumnHeader

            private void ListTreeViewDrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
            {
                e.DrawDefault = true;
                //m_columnHeight = e.Bounds.Height;

                //ColumnHeader columnHeader = Columns[e.ColumnIndex];
                //Column column = columnHeader.Tag.As<Column>();

                //Renderer.DrawColumnHeader(column, e.Graphics, e.Bounds);
            }
开发者ID:sbambach,项目名称:ATF,代码行数:10,代码来源:TreeListView.ListView.cs


示例19: listViewExPowerManagementHosts_DrawColumnHeader

 private void listViewExPowerManagementHosts_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
 {
     e.DrawDefault = true;
 }
开发者ID:agimofcarmen,项目名称:xenadmin,代码行数:4,代码来源:WlbAutomationPage.cs


示例20: listViewResults_DrawColumnHeader

 void listViewResults_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
 {
     e.DrawDefault = true;
 }
开发者ID:mausch,项目名称:NHWorkbench,代码行数:4,代码来源:ResultsView.cs



注:本文中的System.Windows.Forms.DrawListViewColumnHeaderEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Forms.DrawListViewItemEventArgs类代码示例发布时间:2022-05-26
下一篇:
C# Forms.DrawItemEventArgs类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap