On 22/02/14 02:50, Fabio Luis Girardi wrote:
Hi all!

I started the TDBCtrlGrid implementation some days ago. At this point, I don't know if I'm doing some mistake or if Lazarus has a bug. The problem is that I can't put any controls on TDBCtrlGrid area, but I can put controls with csReplicatable in ControlStyle inside a "RowPanel" (TDBCtrlGridRow class) that is a control that will be used to draw rows, BUT LAZARUS don't do this!!

TDBCtrlGrid is created with

ControlStyle := [csOpaque, csDoubleClicks];

and TDBCtrlGridRow is created with

ControlStyle := [csAcceptsControls, csCaptureMouse, csClickEvents,
csDoubleClicks, csOpaque, csReplicatable];


Logically, the row panel must accept controls, but TDBCtrlGrid NOR TDBCtrlGridRow accepts controls.

Add a (protected) method to your class:
    function ChildClassAllowed(ChildClass: TClass): boolean; override;
and set its result to true if you want to allow the ChildClass to be dropped on your component.

Stephano
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to