Ver código fonte

both checkboxes reflect the same property

Juliette ELSASS 11 meses atrás
pai
commit
29f8453199
2 arquivos alterados com 4 adições e 2 exclusões
  1. 0 2
      test/test_progressbar/umain.lfm
  2. 4 0
      test/test_progressbar/umain.pas

+ 0 - 2
test/test_progressbar/umain.lfm

@@ -427,8 +427,6 @@ object Form1: TForm1
     Top = 296
     Width = 80
     Caption = 'Show Timer'
-    Checked = True
-    State = cbChecked
     TabOrder = 16
     OnChange = cbCaptionPercentChange
   end

+ 4 - 0
test/test_progressbar/umain.pas

@@ -139,6 +139,10 @@ end;
 
 procedure TForm1.cbCaptionPercentChange(Sender: TObject);
 begin
+  if Sender = cbCaptionPercent then
+    cbCaptionPercent1.Checked := cbCaptionPercent.Checked
+  else
+    cbCaptionPercent.Checked := cbCaptionPercent1.Checked;
   BGRAMaxMProgress.CaptionShowPercent:= cbCaptionPercent.Checked;
 end;