Board index » delphi » Form param's

Form param's


2006-10-19 01:45:53 AM
delphi36
Hi,
I need use Form in procedure for change Caption, Hint and Hints properties,
my code is :
procedure Idiomas(n_Componente: Integer;s_Form: TForm);
Var i: Integer;s_Hints: TStringList;
Begin
i := n_Componente;
With s_Form Do
Begin
ZQuery_Idioma.Close;
ZQuery_Idioma.Params[0].Value := Components[i].Name;
ZQuery_Idioma.Params[1].Value := Form_Principal.s_Idioma;
ZQuery_Idioma.Open;
..............
Ok with Form name, but I'cant view the specific component for this.
Any idea?
Sergio Pottstock
www.infotecnologia.com
 
 

Re:Form param's

Hi,
You need to use RTTI. Add TypeInfo to uses clause and use:
if IsPublishedProp(Components[i], 'Caption') then
S := GetStrProp(Components[i], 'Caption');
and so on for this.
Hope this helps.
"Sergio Pottstock" <XXXX@XXXXX.COM>writes
Quote
Hi,

I need use Form in procedure for change Caption, Hint and Hints
properties,
my code is :

procedure Idiomas(n_Componente: Integer;s_Form: TForm);
Var i: Integer;s_Hints: TStringList;
Begin
i := n_Componente;
With s_Form Do
Begin
ZQuery_Idioma.Close;
ZQuery_Idioma.Params[0].Value := Components[i].Name;
ZQuery_Idioma.Params[1].Value := Form_Principal.s_Idioma;
ZQuery_Idioma.Open;
..............
Ok with Form name, but I'cant view the specific component for this.

Any idea?

Sergio Pottstock
www.infotecnologia.com