Bonjour à tous, bonne et heureuse Année 2013.
ma préoccupation concerne les procédures associées à l'événement onclick
de mes composants checkbox crées dynamiquement
voici le code
je reçois le message mais le Enabled du checkbox qui reçois l'evenement ne passe pas a false
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
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43 procedure TF_TEST.Button1Click(Sender: TObject); begin for i:= 1 to n do begin pan1:= TPanel.Create(pan); pan1.Parent := pan; pan1.Align := alTop; pan1.Top :=100; pan1.Height := 30; pan1.Width := 30; pan1.BorderStyle:=bsNone; pan1.BevelOuter:=bvNone; pan1.ParentBackground := true; SetLength(ListeCheck, i); ListeCheck[i] := TCheckBox.Create(pan1); with ListeCheck[i] do begin Parent := pan1; SetBounds(8,7,300,14); Font.Name := 'Tahoma'; Font.Style := [fsBold]; ParentFont := False; State:=cbUnchecked; Caption := IntToStr(i)+'.'+IntToStr(j); ListeCheck[i].OnClick:=repchecked; end; Application.ProcessMessages; end; end; procedure TF_TEST.RepChecked(sender: TObject); begin ShowMessage('Best '); Enabled:=false; end;
quelqu'un pourais t'il m'aider,merci d'avance
Partager