Home > Back-end >  Click the ListView control BCB6 how let it keep the selected item margin not disappear?
Click the ListView control BCB6 how let it keep the selected item margin not disappear?

Time:09-27

Click the ListView control BCB6 how let it keep the selected item margin not disappear?

CodePudding user response:

ListView - & gt; HideSelection=false

CodePudding user response:

In a ListView OnChanging event processing:
 void __fastcall TForm1: : ListView1Changing (TObject * Sender, TListItem * Item, TItemChange Change, 
Bool & amp; AllowChange)
{
TListView * lv=dynamic_cast & lt; TListView * & gt; (the Sender);
if (! Lv) return;

TPoint pt (Mouse - & gt; CursorPos. X, Mouse - & gt; CursorPos. Y);
Pt=lv - & gt; The ScreenToClient (pt);
THitTests ht=lv - & gt; GetHitTestInfoAt (pt. X, pt. Y);

AllowChange=! Ht. The Contains (htNowhere);
}

CodePudding user response:

You can! Thank god!

CodePudding user response:

  • Related