FocusRect en DataGridView -codigo en otro lenguaje
Publicado por Preguntador VB.NET (22 intervenciones) el 22/02/2007 11:36:06
Hola, hace unos dias pregunte como se podia quitar el rectangulo punteado que indica que una celda tiene el foco en un Datagridview, y he encontrado este codigo, pero esta en otro lenguaje y no se como pasarlo a VB, por que no se que significa el caracter ~ en este codigo. Os pongo el codigo que he visto:
The DataGridView does not have any built in way to suppress the focus rectangle around the cell. The best you can do is either
A-- Handle the CellPainting event and call:
e.Paint(e.ClipBounds, (DataGridViewPaintParts.All & ~DataGridViewPaintParts.Focus));
e.Handled = true;
or
B -- Handle the RowPrePaint and "and" out the PaintParts.Focus:
e.PaintParts = (DataGridViewPaintParts.All & ~DataGridViewPaintParts.Focus);
The DataGridView does not have any built in way to suppress the focus rectangle around the cell. The best you can do is either
A-- Handle the CellPainting event and call:
e.Paint(e.ClipBounds, (DataGridViewPaintParts.All & ~DataGridViewPaintParts.Focus));
e.Handled = true;
or
B -- Handle the RowPrePaint and "and" out the PaintParts.Focus:
e.PaintParts = (DataGridViewPaintParts.All & ~DataGridViewPaintParts.Focus);
Valora esta pregunta


0