 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Hubert Rétif Guest
|
Posted: Mon Oct 27, 2003 3:55 pm Post subject: Need some starting help |
|
|
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
|
Posted: Tue Oct 28, 2003 8:07 am Post subject: Re: Need some starting help |
|
|
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 |
|
 |
|
|
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
|
|