BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Need some starting help

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi VCL Components Writing
View previous topic :: View next topic  
Author Message
Hubert Rétif
Guest





PostPosted: Mon Oct 27, 2003 3:55 pm    Post subject: Need some starting help Reply with quote



Hi,

I would like to write a component which should give the possibility of
filtering a DBGrid.

Here are the involved classe (I have removed methods and properties for more
clarity):

TFilterGrid = class (TWinControl)
private
ColFilter: array of TColFilter;
FGridToFilter: TDBGrid;
FMaxColFiltered: Integer;
pnFilters: TPanel;
pnMain: TPanel;
public
constructor Create(aOwner: TWinControl); override;
published
end;

Having already done it for simple thing, I know how to register a component
and make it available on the palette.

But in this case, I am expecting, when I put this component on a Form, that
the whole will appear structured:
- pnFilters has pnMain as Parent and is Top aligned
- FGridToFilter has pnMain as Parent and is Client aligned

Where should I put the code for the alignement?
Is TWinControl the right ascendant?

Do you know where I can find such an example?

I am using Delphi6 Update 2.

Thanks,

Hubert.


Back to top
Hubert Rétif
Guest





PostPosted: Tue Oct 28, 2003 8:07 am    Post subject: Re: Need some starting help Reply with quote



In between, I have found out that the keywords for that must be Compound and
Sub-components.

Will try on my own and come again later with probably better questions....

Hubert.

"Hubert Rétif" <public.retif (AT) hispeed (DOT) ch> schrieb im Newsbeitrag
news:3f9d4023 (AT) newsgroups (DOT) borland.com...
Quote:
Hi,

I would like to write a component which should give the possibility of
filtering a DBGrid.

Here are the involved classe (I have removed methods and properties for
more
clarity):

TFilterGrid = class (TWinControl)
private
ColFilter: array of TColFilter;
FGridToFilter: TDBGrid;
FMaxColFiltered: Integer;
pnFilters: TPanel;
pnMain: TPanel;
public
constructor Create(aOwner: TWinControl); override;
published
end;

Having already done it for simple thing, I know how to register a
component
and make it available on the palette.

But in this case, I am expecting, when I put this component on a Form,
that
the whole will appear structured:
- pnFilters has pnMain as Parent and is Top aligned
- FGridToFilter has pnMain as Parent and is Client aligned

Where should I put the code for the alignement?
Is TWinControl the right ascendant?

Do you know where I can find such an example?

I am using Delphi6 Update 2.

Thanks,

Hubert.





Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi VCL Components Writing All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.