mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-07-06 23:06:02 +02:00
Fixed enabling subitems button
git-svn-id: trunk@5590 -
This commit is contained in:
parent
5f696cfe82
commit
2b47924f07
@ -59,14 +59,13 @@ Type
|
|||||||
edtLabel : TEdit;
|
edtLabel : TEdit;
|
||||||
edtIndex : TEdit;
|
edtIndex : TEdit;
|
||||||
TV : TTreeView;
|
TV : TTreeView;
|
||||||
btnSub : TButton;
|
|
||||||
fBuild : Boolean;
|
fBuild : Boolean;
|
||||||
Panel1: TPanel;
|
Panel1: TPanel;
|
||||||
OkButton: TBitBtn;
|
OkButton: TBitBtn;
|
||||||
CancelButton: TBitBtn;
|
CancelButton: TBitBtn;
|
||||||
LeftGroupBox: TGroupBox;
|
LeftGroupBox: TGroupBox;
|
||||||
NewButton: TButton;
|
NewButton: TButton;
|
||||||
AddButton: TButton;
|
SubButton: TButton;
|
||||||
DeleteButton: TButton;
|
DeleteButton: TButton;
|
||||||
RightGroupBox: TGroupBox;
|
RightGroupBox: TGroupBox;
|
||||||
CaptionLabel: TLabel;
|
CaptionLabel: TLabel;
|
||||||
@ -314,9 +313,9 @@ begin
|
|||||||
OnClick:=@btnAddOnClick;
|
OnClick:=@btnAddOnClick;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
AddButton:=TButton.Create(self);
|
SubButton:=TButton.Create(self);
|
||||||
With AddButton do begin
|
With SubButton do begin
|
||||||
Name:='AddButton';
|
Name:='SubButton';
|
||||||
Parent :=LeftGroupBox;
|
Parent :=LeftGroupBox;
|
||||||
Enabled:=False;
|
Enabled:=False;
|
||||||
Left :=NewButton.Left;
|
Left :=NewButton.Left;
|
||||||
@ -333,7 +332,7 @@ begin
|
|||||||
Parent :=LeftGroupBox;
|
Parent :=LeftGroupBox;
|
||||||
Left :=NewButton.Left;
|
Left :=NewButton.Left;
|
||||||
Width :=NewButton.Width;
|
Width :=NewButton.Width;
|
||||||
Top :=AddButton.Top+AddButton.Height+30;
|
Top :=SubButton.Top+SubButton.Height+30;
|
||||||
Caption:=sccsLvEdtBtnDel;
|
Caption:=sccsLvEdtBtnDel;
|
||||||
OnClick:=@btnDelOnClick;
|
OnClick:=@btnDelOnClick;
|
||||||
end;
|
end;
|
||||||
@ -434,13 +433,13 @@ begin
|
|||||||
edtIndex.Text:=IntToStr(TN.ImageIndex);
|
edtIndex.Text:=IntToStr(TN.ImageIndex);
|
||||||
edtLabel.Enabled:=True;
|
edtLabel.Enabled:=True;
|
||||||
edtIndex.Enabled:=True;
|
edtIndex.Enabled:=True;
|
||||||
btnSub.Enabled :=True;
|
SubButton.Enabled :=True;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
EdtLabel.Text:='';
|
EdtLabel.Text:='';
|
||||||
EdtIndex.Text:='';
|
EdtIndex.Text:='';
|
||||||
btnSub.Enabled:=False;
|
SubButton.Enabled:=False;
|
||||||
edtLabel.Enabled:=False;
|
edtLabel.Enabled:=False;
|
||||||
edtIndex.Enabled:=False;
|
edtIndex.Enabled:=False;
|
||||||
end;
|
end;
|
||||||
@ -458,7 +457,7 @@ begin
|
|||||||
Top :=22;
|
Top :=22;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
With AddButton do begin
|
With SubButton do begin
|
||||||
Left :=NewButton.Left;
|
Left :=NewButton.Left;
|
||||||
Width :=NewButton.Width;
|
Width :=NewButton.Width;
|
||||||
Top :=NewButton.Top+NewButton.Height+30;
|
Top :=NewButton.Top+NewButton.Height+30;
|
||||||
@ -467,7 +466,7 @@ begin
|
|||||||
With DeleteButton do begin
|
With DeleteButton do begin
|
||||||
Left :=NewButton.Left;
|
Left :=NewButton.Left;
|
||||||
Width :=NewButton.Width;
|
Width :=NewButton.Width;
|
||||||
Top :=AddButton.Top+AddButton.Height+30;
|
Top :=SubButton.Top+SubButton.Height+30;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
With TV do
|
With TV do
|
||||||
|
Loading…
Reference in New Issue
Block a user