BCB-用右鍵讓 ListBox 的 Item 取得焦點

yao67 2018-08-16 12:53

void __fastcall TForm1::ListBox1MouseUp(TObject *Sender,
  TMouseButton Button, TShiftState Shift, int X, int Y)
{
   if (Button == mbRight){
      ListBox1->ItemIndex = ListBox1->ItemAtPos(Point(X,Y), true);
   }
}
相关文章