Bonjour à tous
Les boutons (TBitbtn) que je veux lister sont sur des GroupBox. C'est là le problème.
Je n'atteins pas les boutons.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 Procedure Desactiver_Ts_Boutons_Sur_TabSheet_Svgrd; Var i : integer; begin Form1.TabSheet_Svgrd.PageControl.ActivePage := Form1.TabSheet_Svgrd; for i := 0 to Form1.TabSheet_Svgrd.ControlCount -1 do begin if Form1.TabSheet_Svgrd.Controls[i] is TBitBtn then begin Form1.TabSheet_Svgrd.Controls[i].Enabled := False; // l'exécution ne passe jamais là end; end; end;
Avec la propriété TControl.Name
je m'aperçois que ma boucle ne liste que les GroupBox, pas les boutons.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 Form1.Controls[i].Name
Y a-t-il un moyen un peu moins bourrin que lister manuellement ces boutons ds un tableau de TControl ?
Merci
Partager