1 pièce(s) jointe(s)
Propriété Text d'un TCornerButton
Bonjour,
Je n'arrive pas à atteindre la propriété Text d'un TCornerButton.
Avec ce code cela fonctionne très bien avec un TBoutton , TLabel, TSpeedButton.
Si quelqu’un pouvait m'expliquer ?
Merci
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
procedure TFAccueil.LangueClick(Sender: TObject);
var
i, x: Integer;
Composent : TComponent ;
Forme : TForm ;
begin
Language:=(sender as Tbutton).Tag;
If MList.Count > 0 then
for i := Application.ComponentCount - 1 downto 0 do
if Application.components[i] is TForm then
begin
Forme := TForm(application.components[i]);
if Forme.Name <> 'FLangues' then
for x := Forme.ComponentCount - 1 downto 0 do
begin
Composent := Forme.Components[x];
if Composent.Tag > 0 then
begin
RecordTxt := MList.Items[Composent.Tag-1] ;
if Forme.Components[x] is TLabel then
TLabel(FindComponent(Composent.Name)).Text := RecordTxt^.LG[Language] ;
if Forme.Components[x] is TButton Then
TButton(FindComponent(Composent.Name)).Text := RecordTxt^.LG[Language] ;
if Forme.Components[x] is TSpeedButton Then
TSpeedButton(FindComponent(Composent.Name)).Text := RecordTxt^.LG[Language] ;
if Forme.Components[x] is TCornerButton then
TCornerButton(FindComponent(Composent.Name)).Text := 'essai'//RecordTxt^.LG[Language] ;
end;
end;
end;
end; |
Pièce jointe 409387