mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-25 00:52:10 +01:00
JCF2: set Enabled state of controls in preprocessor settings
git-svn-id: trunk@33351 -
This commit is contained in:
parent
310cccba14
commit
81de09611d
@ -57,6 +57,7 @@ inherited fPreProcessor: TfPreProcessor
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Enable preprocessor parsing'
|
||||
Checked = True
|
||||
OnChange = cbEnableChange
|
||||
State = cbChecked
|
||||
TabOrder = 0
|
||||
end
|
||||
|
||||
@ -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.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user