JCF2: set Enabled state of controls in preprocessor settings

git-svn-id: trunk@33351 -
This commit is contained in:
juha 2011-11-05 17:53:11 +00:00
parent 310cccba14
commit 81de09611d
2 changed files with 13 additions and 2 deletions

View File

@ -57,6 +57,7 @@ inherited fPreProcessor: TfPreProcessor
BorderSpacing.Around = 6
Caption = 'Enable preprocessor parsing'
Checked = True
OnChange = cbEnableChange
State = cbChecked
TabOrder = 0
end

View File

@ -44,6 +44,7 @@ type
lblSymbols: TLabel;
mOptions: TMemo;
lblCompilerOptions: TLabel;
procedure cbEnableChange(Sender: TObject);
procedure FrameResize(Sender: TObject);
public
constructor Create(AOwner: TComponent); override;
@ -77,8 +78,8 @@ procedure TfPreProcessor.Setup(ADialog: TAbstractOptionsEditorDialog);
begin
cbEnable.Caption := lisPrpEnablePreprocessorParsing;
lblSymbols.Caption := lisPrpSymbolsDefinedForConditionalCompilation;
lblCompilerOptions.Caption :=
lisPrpCompilerOptionsDefinedForConditionalCompilation;
lblCompilerOptions.Caption := lisPrpCompilerOptionsDefinedForConditionalCompilation;
cbEnableChange(cbEnable);
end;
procedure TfPreProcessor.ReadSettings(AOptions: TAbstractIDEOptions);
@ -111,6 +112,15 @@ begin
mSymbols.Height := (mSymbols.Height+mOptions.Height) div 2;
end;
procedure TfPreProcessor.cbEnableChange(Sender: TObject);
var
b: Boolean;
begin
b := (Sender as TCheckBox).Checked;
mSymbols.Enabled := b;
mOptions.Enabled := b;
end;
initialization
RegisterIDEOptionsEditor(JCFOptionsGroup, TfPreProcessor, JCFOptionPreProcessor);
end.