L
loutian
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure wmlbuttonup(var message:twmlbuttonup);message wm_lbuttonup;
procedure tcontrol.wmlbuttonup(var message:twmlbuttonup);
begin
inherited;
if cscapturemouse in controlstyle then mousecapture:=false;
if csclicked in controlstate then
begin
exclude(fcontrolstate,csclicked);
if ptinrect(clientrect,smallpointtopoint(message.pos)) then
click;
end;
domouseup(message,mbleft);
end;
procedure tcontrol.click;
begin
if assigned(fonclick) and (action<> nil)
and(@fonclick<>@ action.inexcute)
then fonclick(self)
else if not (csdesigning in componentstate)
and(actionlink<> nil) then
actionlink.execute
else if assigned(fonclick) then
fonclick(self);
end;
procedure tcontrol.wmlbuttonup(var message:twmlbuttonup);
begin
inherited;
if cscapturemouse in controlstyle then mousecapture:=false;
if csclicked in controlstate then
begin
exclude(fcontrolstate,csclicked);
if ptinrect(clientrect,smallpointtopoint(message.pos)) then
click;
end;
domouseup(message,mbleft);
end;
procedure tcontrol.click;
begin
if assigned(fonclick) and (action<> nil)
and(@fonclick<>@ action.inexcute)
then fonclick(self)
else if not (csdesigning in componentstate)
and(actionlink<> nil) then
actionlink.execute
else if assigned(fonclick) then
fonclick(self);
end;