Changing font in TListView::OnCustomDrawItem

2005-02-11 06:47:03 PM
We have just found that changing the font style in OnCustomDrawItem
causes problems with the selection rectangle in large icon view. The
problem is that the new style can cause the caption to wrap but the
selection rectangle doesn't accomodate the new size.
Do I have to move the code to the OnAdvancedCustomDrawItem handler?
FWIW the current handler is below:
void __fastcall TFrmSectorViewer::lvwFileViewCustomDrawItem(
TCustomListView *Sender, TListItem *Item, TCustomDrawState State,
bool &DefaultDraw)
TGeneral_ObjectList * dataInfo=
reinterpret_cast<TGeneral_ObjectList>( Item->Data );
if( !dataInfo->GenTreeInfo.IsColouredF )
TListView * listView=getActiveListView();
ViewerUtils_FontStyle( dataInfo->GenTreeInfo.FontStyle );
Andrue Cope [TeamB]
[Bicester, Uk]