![]() ![]() ' Determine whether the cell should be painted with the ' Do not automatically paint the focus rectangle.Į.PaintParts = e.PaintParts And Not DataGridViewPaintParts.Focus Sub dataGridView1_RowPrePaint(ByVal sender As Object, _īyVal e As DataGridViewRowPrePaintEventArgs) _ ' Paints the custom selection background for selected rows. Horizontal))Į.Graphics.FillRectangle(backbrush, rowBounds) Paint the custom selection background. If ((e.State & DataGridViewElementStates.Selected) = ![]() Determine whether the cell should be painted Do not automatically paint the focus rectangle.Į.PaintParts &= ~DataGridViewPaintParts.Focus Void dataGridView1_RowPrePaint(object sender, Paints the custom selection background for selected rows. This example is part of a larger example available in How to: Customize the Appearance of Rows in the Windows Forms DataGridView Control. The following code example illustrates the use of this type. The background of the cell should be painted when the cell is selected. ![]() The focus rectangle should be painted around the cell. The foreground of the cell content should be painted. The background of the cell content should be painted. The border of the cell should be painted. The background of the cell should be painted. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |