Ahoj,
pisu objekt, ktery bude jazykove lokalizovat jiny objekt. Delam to pomoci metody (procedury), ktere predam TComponent v parametru a podle jejiho typu volam prislusnou proceduru, ktera provede dal jeji lokalizaci.
procedure TLokalizator.LokalizujComponent(AForm: TForm;
AComponent: TComponent);
begin
if AComponent is TForm then
LokalizujForm(AComponent as TForm)
else
if AComponent is TApplication then
LokalizujApplication(AComponent as TApplication)
else
if AComponent is TLabel then
LokalizujLabel(AForm, AComponent as TLabel)
else
if AComponent is TButton then
LokalizujButton(AForm, AComponent as TButton)
else
if AComponent is TComboBox then
LokalizujComboBox(AForm, AComponent as TComboBox)
else
if AComponent is TPageControl then
LokalizujPageControl(AForm, AComponent as TPageControl)
end;
Pro vsechny doposud potrebne typy komponent to funguje dobre, problem nastal az s typem TPageControl, ktery testovanim na is nevyhovi podmince a tudiz se nezavola procedura LokalizujPageControl.
Muze mi nekdo poradit, co delam spatne?