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;
     }
 }
Exemple #2
0
        protected override void OnDrawColumnHeader(DrawListViewColumnHeaderEventArgs e)
        {

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

        }
Exemple #3
0
        protected override void OnDrawColumnHeader(DrawListViewColumnHeaderEventArgs e)
        {
            base.OnDrawColumnHeader(e);
            e.DrawBackground();
            e.DrawText();

            //e.BackColor = System.Drawing.Color.AliceBlue;
        }
 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);
 }
		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());
		}
 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);
     }
 }
Exemple #7
0
        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);
            //}
        }
        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;
            }
        }
 void HistoryListView_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
 {
     e.DrawDefault = true;
 }
Exemple #10
0
 private void lsvMods_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
 {
     e.DrawDefault = true;
 }
 private void dataSelectionList_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
 {
     e.DrawDefault = true;
 }
Exemple #12
0
		protected internal virtual void OnDrawColumnHeader(DrawListViewColumnHeaderEventArgs e)
		{
			DrawListViewColumnHeaderEventHandler eh = (DrawListViewColumnHeaderEventHandler)(Events[DrawColumnHeaderEvent]);
			if (eh != null)
				eh(this, e);
		}
Exemple #13
0
		protected virtual bool DrawListViewColumnHeaderOwnerDraw (Graphics dc, ListView control, ColumnHeader column, Rectangle bounds)
		{
			ListViewItemStates state = ListViewItemStates.ShowKeyboardCues;
			if (column.Pressed)
				state |= ListViewItemStates.Selected;

			DrawListViewColumnHeaderEventArgs args = new DrawListViewColumnHeaderEventArgs (dc,
					bounds, column.Index, column, state, SystemColors.ControlText, ThemeEngine.Current.ColorControl, DefaultFont);
			control.OnDrawColumnHeader (args);

			return !args.DrawDefault;
		}
 private void listViewExPowerManagementHosts_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
 {
     e.DrawDefault = true;
 }
Exemple #15
0
 private void listViewGuarantors_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
 {
 }
Exemple #16
0
 protected virtual void OnDrawColumnHeader(DrawListViewColumnHeaderEventArgs e)
 {
     throw null;
 }
 private void lvwUpdates_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
 {
     e.DrawDefault = true;
     //
 }
 protected override void OnDrawColumnHeader(DrawListViewColumnHeaderEventArgs e)
 {
     base.OnDrawColumnHeader(e);
 }
 private void LstChangesDrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
 {
     e.DrawDefault = true;
 }
Exemple #20
0
            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);
            }
Exemple #21
0
 private void SledTtyListViewDrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
 {
     e.DrawDefault = true;
 }
Exemple #22
0
 void listViewResults_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
 {
     e.DrawDefault = true;
 }
Exemple #23
0
        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;
            }
        }
Exemple #24
0
		// We just want the default behaivor here
		void m_lvMatches_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
		{
			e.DrawDefault = true;
		}
Exemple #25
0
 private void STListView_DrawColumnHeader(object sender, System.Windows.Forms.DrawListViewColumnHeaderEventArgs e)
 {
 }
 protected virtual void OnDrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
 {
     e.DrawDefault = true;
 }
 private void SubtitleListView_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
 {
     e.DrawDefault = true;
 }
 private void listViewFilterItem_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
 {
     e.DrawDefault = true;
 }
 private void listView_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
 {
     var startX = e.ColumnIndex == 0 ? -1 : e.Bounds.X;
     var endX = e.Bounds.X + e.Bounds.Width - 1;
     // Background
     e.Graphics.FillRectangle(new SolidBrush(Color.FromArgb(215, 228, 242)), startX, -1, e.Bounds.Width + 1, e.Bounds.Height + 1);
     // Left vertical line
     e.Graphics.DrawLine(new Pen(SystemColors.ControlLightLight), startX, -1, startX, e.Bounds.Y + e.Bounds.Height + 1);
     // TopCount horizontal line
     e.Graphics.DrawLine(new Pen(SystemColors.ControlLightLight), startX, -1, endX, -1);
     // Bottom horizontal line
     e.Graphics.DrawLine(new Pen(SystemColors.ControlDark), startX, e.Bounds.Height - 1, endX, e.Bounds.Height - 1);
     // Right vertical line
     e.Graphics.DrawLine(new Pen(SystemColors.ControlDark), endX, -1, endX, e.Bounds.Height + 1);
     var roundedFontSize = (float)Math.Round(e.Font.SizeInPoints);
     var bounds = new RectangleF(e.Bounds.X + 4, (e.Bounds.Height - 8 - roundedFontSize) / 2, e.Bounds.Width, roundedFontSize + 6);
     e.Graphics.DrawString(e.Header.Text, e.Font, new SolidBrush(SystemColors.ControlText), bounds);
 }
		/// <summary>
		/// Owner draw requires drawing the column header as well as the list items.  See LT-7007.
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		void currentList_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
		{
			e.DrawBackground();
			e.DrawText();
		}
 private void lvTaskList_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
 {
     // Draw default column header
     e.DrawDefault = true;
 }
Exemple #32
0
 private void listViewGuideGenres_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
 {
   e.DrawDefault = true;
 }