Hello! I'm writing a control that inherits from ListView. I need to override MouseDown propertie. To do this I am writing nex declaration in the class of my component:
DYNAMIC void __fastcall MouseDown(System::Uitypes::TMouseButton Button, System::Classes::TShiftState Shift, int X, int Y);
void __fastcall TMyListView::MouseDown(System::Uitypes::TMouseButton Button, System::Classes::TShiftState Shift, int X, int Y)
if(Items->Count > 0 && ItemIndex != -1)
As a signal when mouse pressed on item I use Beep()
function. But Beep
sounds when mouse was upped, i.e. was made a full click. And there is a problem.
How to fix this? I do not need to override SelectItem event because it occurs when item selected or unselected only. I need to handle the mouse pressing.
Please help to solve my problem.