Board index » cppbuilder » TListView and selected
Curtis Richards
![]() CBuilder Developer |
TListView and selected2006-09-07 08:08:05 AM cppbuilder18 Can someone tell me what I need to do to make the selected area of a customdraw cell on the listview to act the same way as the other cells when you select the row. For example, when you select a row the entire row turns to blue, and the text appears white. Now on the customdraw cell it stays white, there is no border or coloring. I took this from a vcl component set that I am trying to figure out that part on. void __fastcall TDownLoaderTest::ListViewAdvancedCustomDrawSubItem( TCustomListView *Sender, TListItem *Item, int SubItem, TCustomDrawState State, TCustomDrawStage Stage, bool &DefaultDraw) { TclInternetItem *InternetItem = static_cast<TclInternetItem*>(Item->Data); if ((!InternetItem) || (SubItem != 4)) return; TRect R; TclResourceStateList *ResourceState = InternetItem->ResourceState; ListView_GetSubItemRect(Item->Handle, Item->Index, SubItem, LVIR_BOUNDS, &R); TControlCanvas *canvas = new TControlCanvas(); __try { canvas->Control = Sender; clProgressBar->Draw(ResourceState, canvas, R); } __finally { delete canvas; } DefaultDraw = false; } Can someone help me out here. Thanks. |