Hi,
I have a groupbox with some controls, edits, buttons etc.
Now I want to find out, when a user clicks in the groupbox, which control he has clicked on. This seems to be possible with a MouseDown trigger and ControlAtPos().
I tried:
void __fastcall Tform1::GroupBoxMouseDown(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y)
{
TPoint pos = TPoint(X, Y);
TControl *ctrl = ControlAtPos(pos, false, false);
}
But this trigger appears to fire only when I don't click on a control!!
What can be on hand or what can I do?
Thanks
Henk
I have a groupbox with some controls, edits, buttons etc.
Now I want to find out, when a user clicks in the groupbox, which control he has clicked on. This seems to be possible with a MouseDown trigger and ControlAtPos().
I tried:
void __fastcall Tform1::GroupBoxMouseDown(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y)
{
TPoint pos = TPoint(X, Y);
TControl *ctrl = ControlAtPos(pos, false, false);
}
But this trigger appears to fire only when I don't click on a control!!
What can be on hand or what can I do?
Thanks
Henk