08-12-2023, Saat: 02:18
(Son Düzenleme: 08-12-2023, Saat: 02:22, Düzenleyen: endmuh.
Sebep: düzenleme yapmak
)
Merhabalar. Cxgrid nesnesini form üzerinde mouse ile sağa sola taşımak istiyorum Bunu Yaparken formun on create olayında cxgrid nesnesinin eventine dinamik olarak yazmak istiyorum
Onmouse move , Onmouse down , Onmouse UP gibi
örnek kodum aşağıdaki gibi ama malesef çalıştıramadım.... NOT diğer nesneler için kod çalışıyor (Button, text vs...) Fakat cxgrid için çalışmıyor.
if PClassType=TcxGrid then
begin
// ShowMessage('Oldu');
AGrid := TcxGrid(Screen.ActiveForm.FindComponent(CompName));
AGrid.Hint:=CompName;
AGrid.ShowHint:=true;
with Agrid do
begin
OnMouseDown:=P_MouseDown;
OnMouseMove:=P_MouseMove;
OnMouseUp:=P_MouseUp;
end;
end;
Onmouse move , Onmouse down , Onmouse UP gibi
örnek kodum aşağıdaki gibi ama malesef çalıştıramadım.... NOT diğer nesneler için kod çalışıyor (Button, text vs...) Fakat cxgrid için çalışmıyor.
if PClassType=TcxGrid then
begin
// ShowMessage('Oldu');
AGrid := TcxGrid(Screen.ActiveForm.FindComponent(CompName));
AGrid.Hint:=CompName;
AGrid.ShowHint:=true;
with Agrid do
begin
OnMouseDown:=P_MouseDown;
OnMouseMove:=P_MouseMove;
OnMouseUp:=P_MouseUp;
end;
end;

