Board index » delphi » Component Creation Problem
Aaron Miles
Delphi Developer |
Component Creation Problem2003-08-14 11:27:13 AM delphi163 Hi All, Find below my code for a component I am trying to create. What I want is a TPanel with Components already created on it with functionality already in place. What I do it put 2 x TAdvstringrids on the TPanel one containing all of the stores and transfer from one grid to another. My problem is working out the functionality but working out how to create a TAdvstringrid on the TPanel. I hope this makes sense Thanks in Advance Aaron //BEGINING OF COMPONENT unit A7StoreSelection; interface uses Windows, Messages, SysUtils, Classes, Controls, ExtCtrls, AdvGrid; type TA7StoreSelection = class(TPanel) private { Private declarations } protected { Protected declarations } public List: TAdvStringGrid; constructor Create(AOwner: TComponent); override; { Public declarations } published { Published declarations } end; procedure Register; implementation constructor TA7StoreSelection.Create(AOwner: TComponent); begin inherited Create(AOwner); Width := 441; Height := 305; Caption := ' '; with List do begin List := TAdvStringGrid.Create(AOwner); // This is where my problem begins. Have trired Self instead of Aowner but didn't work and I am outta ideas. Left := 16; Top := 40; Width := 169; Height := 233; Cursor := crDefault; ColCount := 4; DefaultRowHeight := 21; FixedCols := 0; RowCount := 2; FixedRows := 1; end; end; procedure Register; begin RegisterComponents('A7', [TA7StoreSelection]); end; end. |