Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

sibiks

@sibiks
About
Posts
2
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • ListView Gridline color
    S sibiks

    /// /// /// /// /// private void TreeListView_DrawItem( object sender, DrawListViewItemEventArgs e ) { Graphics g = e.Graphics; TreeListViewItem item = ( TreeListViewItem )e.Item; item.UpdateBounds(); this.DrawExpandMarker( g, item ); this.DrawCheckBox( g, item ); StringFormat sf = new StringFormat(); sf.LineAlignment = StringAlignment.Center; sf.FormatFlags = StringFormatFlags.NoWrap; SolidBrush foreBrush = new SolidBrush( this.ForeColor ); if( this.changeSelectionForeColor == true ) { foreBrush = new SolidBrush( item.ForeColor ); } SolidBrush fillBrush = new SolidBrush( item.BackColor ); Rectangle fillRect = e.Bounds; fillRect.X = item.TextBounds.X; fillRect.Width -= fillRect.X; fillRect.Height -= 1; if( item.Selected == true && item.ReadOnly == false && item.IsDummy == false ) { selectedItem = item; item.IsInvalidated = false; foreBrush = new SolidBrush( SystemColors.HighlightText ); if( this.changeSelectionForeColor == true ) { foreBrush = new SolidBrush( item.ForeColor ); } fillBrush = new SolidBrush( SystemColors.Highlight ); } g.FillRectangle( fillBrush, fillRect ); string text = this.GetAdjustedString( g, e.Item.Text, item.TextBounds, this.Font ); if( item.ReadOnly == false ) { g.DrawString( text, this.Font, foreBrush, item.TextBounds, sf ); } if( item.IsButtonNeeded == true ) { SolidBrush buttonBrush = new SolidBrush( this.Parent.BackColor ); Rectangle buttonRect = item.ButtonBounds; g.FillRectangle( buttonBrush, buttonRect ); Border3DStyle border = item.IsButtonPressed ? Border3DStyle.Adjust : Border3DStyle.RaisedInner; ControlPaint.DrawBorder3D( g, buttonRect, border ); sf.Alignment = StringAlignment.Center; this.Draw3DText( g, buttonRect, item.ButtonText, sf, item.IsButtonPressed );

    C# css

  • ListView Gridline color
    S sibiks

    I have one listview which is owner drawn. I have to change the grid line color. I tried this by making GridLines = false for listview and Draw the gridlines programatically. But if there are 100 items its flickering and a lot of painting issues Sibi

    C# css
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups