![]() |
![]() |
| Paypal | FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
|||||||
| Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
|
|
Herramientas | Buscar en Tema | Desplegado |
|
#2
|
||||
|
||||
|
Hola Angel.
Un ejemplo: Código:
int BoldColumn = -1;
// ajustar ListView
void __fastcall TForm1::FormCreate(TObject *Sender)
{
ListView1->OwnerDraw = false;
ListView1->ViewStyle = vsReport;
}
// tratar columna 0
void __fastcall TForm1::ListView1CustomDrawItem(TCustomListView *Sender,
TListItem *Item, TCustomDrawState State, bool &DefaultDraw)
{
if (BoldColumn == 0)
Sender->Canvas->Font->Style = TFontStyles() << fsBold;
}
// tratar otras columnas
void __fastcall TForm1::ListView1AdvancedCustomDrawSubItem(
TCustomListView *Sender, TListItem *Item, int SubItem,
TCustomDrawState State, TCustomDrawStage Stage, bool &DefaultDraw)
{
if (SubItem != 0 && SubItem == BoldColumn)
Sender->Canvas->Font->Style = TFontStyles() << fsBold;
}
// aplicar negrita a columna (0..n-1)
void __fastcall TForm1::Button1Click(TObject *Sender)
{
BoldColumn = StrToIntDef(Edit1->Text, -1);
ListView1->Invalidate();
}
![]()
__________________
Daniel Didriksen Guía de estilo - Uso de las etiquetas - La otra guía de estilo .... |
|
|
Temas Similares
|
||||
| Tema | Autor | Foro | Respuestas | Último mensaje |
| Mover columnas de un ListView por codigo | abracadabra | OOP | 5 | 10-11-2007 20:28:55 |
| listview, autoajustar tamaño columnas | munheko | OOP | 4 | 19-05-2005 19:55:36 |
| ListView con tres columnas check | Ricardo Alfredo | Varios | 1 | 15-10-2003 16:14:42 |
| Alineamiento en columnas de ListView | andre | OOP | 5 | 08-05-2003 15:03:37 |
| Cambiar estilo de fuente en columna de ListView | andre | OOP | 3 | 08-05-2003 14:50:47 |
|