mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-21 23:08:54 +02:00
implemented IDE Help
improved anchoring git-svn-id: trunk@12384 -
This commit is contained in:
parent
a9f96510dc
commit
ecac4e7467
@ -1,25 +1,30 @@
|
|||||||
object ViewUnitDialog: TViewUnitDialog
|
object ViewUnitDialog: TViewUnitDialog
|
||||||
Left = 337
|
Left = 337
|
||||||
Height = 265
|
Height = 300
|
||||||
Top = 295
|
Top = 295
|
||||||
Width = 315
|
Width = 320
|
||||||
HorzScrollBar.Page = 314
|
HorzScrollBar.Page = 319
|
||||||
VertScrollBar.Page = 264
|
VertScrollBar.Page = 299
|
||||||
ActiveControl = Listbox
|
ActiveControl = Listbox
|
||||||
|
BorderIcons = [biSystemMenu]
|
||||||
Caption = 'View Project Units'
|
Caption = 'View Project Units'
|
||||||
ClientHeight = 265
|
ClientHeight = 300
|
||||||
ClientWidth = 315
|
ClientWidth = 320
|
||||||
Position = poScreenCenter
|
Position = poScreenCenter
|
||||||
object btnOK: TBitBtn
|
object btnOK: TBitBtn
|
||||||
AnchorSideTop.Control = btnCancel
|
|
||||||
AnchorSideRight.Control = btnCancel
|
AnchorSideRight.Control = btnCancel
|
||||||
Left = 107
|
AnchorSideBottom.Control = Owner
|
||||||
Height = 25
|
AnchorSideBottom.Side = asrBottom
|
||||||
Top = 231
|
Left = 153
|
||||||
Width = 96
|
Height = 28
|
||||||
Anchors = [akTop, akRight]
|
Top = 266
|
||||||
BorderSpacing.Right = 5
|
Width = 75
|
||||||
|
Anchors = [akRight, akBottom]
|
||||||
|
AutoSize = True
|
||||||
|
BorderSpacing.Around = 6
|
||||||
Caption = '&OK'
|
Caption = '&OK'
|
||||||
|
Constraints.MinHeight = 25
|
||||||
|
Constraints.MinWidth = 75
|
||||||
Default = True
|
Default = True
|
||||||
Kind = bkOK
|
Kind = bkOK
|
||||||
ModalResult = 1
|
ModalResult = 1
|
||||||
@ -28,18 +33,22 @@ object ViewUnitDialog: TViewUnitDialog
|
|||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
object btnCancel: TBitBtn
|
object btnCancel: TBitBtn
|
||||||
AnchorSideTop.Control = MultiSelectCheckBox
|
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideRight.Control = Listbox
|
AnchorSideRight.Control = Owner
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 208
|
AnchorSideBottom.Control = Owner
|
||||||
Height = 25
|
AnchorSideBottom.Side = asrBottom
|
||||||
Top = 231
|
Left = 234
|
||||||
Width = 96
|
Height = 28
|
||||||
Anchors = [akTop, akRight]
|
Top = 266
|
||||||
BorderSpacing.Top = 5
|
Width = 80
|
||||||
|
Anchors = [akRight, akBottom]
|
||||||
|
AutoSize = True
|
||||||
|
BorderSpacing.Around = 6
|
||||||
Cancel = True
|
Cancel = True
|
||||||
Caption = 'Cancel'
|
Caption = 'Cancel'
|
||||||
|
Constraints.MinHeight = 25
|
||||||
|
Constraints.MinWidth = 75
|
||||||
Kind = bkCancel
|
Kind = bkCancel
|
||||||
ModalResult = 2
|
ModalResult = 2
|
||||||
NumGlyphs = 0
|
NumGlyphs = 0
|
||||||
@ -47,42 +56,63 @@ object ViewUnitDialog: TViewUnitDialog
|
|||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
end
|
end
|
||||||
object Edit: TEdit
|
object Edit: TEdit
|
||||||
Left = 10
|
Left = 6
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 10
|
Top = 6
|
||||||
Width = 294
|
Width = 308
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Align = alTop
|
||||||
|
Anchors = [akRight]
|
||||||
|
BorderSpacing.Around = 6
|
||||||
Enabled = False
|
Enabled = False
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
end
|
end
|
||||||
object Listbox: TListBox
|
object Listbox: TListBox
|
||||||
AnchorSideLeft.Control = Edit
|
|
||||||
AnchorSideTop.Control = Edit
|
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideRight.Control = Edit
|
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 10
|
AnchorSideBottom.Control = MultiSelectCheckBox
|
||||||
Height = 168
|
Left = 6
|
||||||
Top = 40
|
Height = 204
|
||||||
Width = 294
|
Top = 37
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Width = 308
|
||||||
BorderSpacing.Top = 5
|
Align = alTop
|
||||||
|
Anchors = [akBottom]
|
||||||
|
BorderSpacing.Around = 6
|
||||||
ClickOnSelChange = False
|
ClickOnSelChange = False
|
||||||
OnDblClick = BTNOKCLICK
|
OnDblClick = BTNOKCLICK
|
||||||
OnKeyDown = ListboxKeyDown
|
OnKeyDown = ListboxKeyDown
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object MultiSelectCheckBox: TCheckBox
|
object MultiSelectCheckBox: TCheckBox
|
||||||
AnchorSideLeft.Control = Edit
|
AnchorSideLeft.Control = Owner
|
||||||
AnchorSideTop.Control = Listbox
|
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 10
|
AnchorSideBottom.Control = btnCancel
|
||||||
|
Left = 6
|
||||||
Height = 13
|
Height = 13
|
||||||
Top = 213
|
Top = 247
|
||||||
Width = 75
|
Width = 75
|
||||||
BorderSpacing.Top = 5
|
Anchors = [akLeft, akBottom]
|
||||||
|
BorderSpacing.Around = 6
|
||||||
Caption = 'Multi Select'
|
Caption = 'Multi Select'
|
||||||
OnClick = MultiselectCheckBoxClick
|
OnClick = MultiselectCheckBoxClick
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
end
|
end
|
||||||
|
object HelpButton: TBitBtn
|
||||||
|
AnchorSideLeft.Control = Owner
|
||||||
|
AnchorSideBottom.Control = Owner
|
||||||
|
AnchorSideBottom.Side = asrBottom
|
||||||
|
Left = 6
|
||||||
|
Height = 28
|
||||||
|
Top = 266
|
||||||
|
Width = 75
|
||||||
|
Anchors = [akLeft, akBottom]
|
||||||
|
AutoSize = True
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = '&Help'
|
||||||
|
Constraints.MinHeight = 25
|
||||||
|
Constraints.MinWidth = 75
|
||||||
|
Kind = bkHelp
|
||||||
|
NumGlyphs = 0
|
||||||
|
OnClick = HelpButtonClick
|
||||||
|
TabOrder = 5
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,32 +1,42 @@
|
|||||||
{ This is an automatically generated lazarus resource file }
|
{ This is an automatically generated lazarus resource file }
|
||||||
|
|
||||||
LazarusResources.Add('TViewUnitDialog','FORMDATA',[
|
LazarusResources.Add('TViewUnitDialog','FORMDATA',[
|
||||||
'TPF0'#15'TViewUnitDialog'#14'ViewUnitDialog'#4'Left'#3'Q'#1#6'Height'#3#9#1#3
|
'TPF0'#15'TViewUnitDialog'#14'ViewUnitDialog'#4'Left'#3'Q'#1#6'Height'#3','#1
|
||||||
+'Top'#3''''#1#5'Width'#3';'#1#18'HorzScrollBar.Page'#3':'#1#18'VertScrollBar'
|
+#3'Top'#3''''#1#5'Width'#3'@'#1#18'HorzScrollBar.Page'#3'?'#1#18'VertScrollB'
|
||||||
+'.Page'#3#8#1#13'ActiveControl'#7#7'Listbox'#7'Caption'#6#18'View Project Un'
|
+'ar.Page'#3'+'#1#13'ActiveControl'#7#7'Listbox'#11'BorderIcons'#11#12'biSyst'
|
||||||
+'its'#12'ClientHeight'#3#9#1#11'ClientWidth'#3';'#1#8'Position'#7#14'poScree'
|
+'emMenu'#0#7'Caption'#6#18'View Project Units'#12'ClientHeight'#3','#1#11'Cl'
|
||||||
+'nCenter'#0#7'TBitBtn'#5'btnOK'#21'AnchorSideTop.Control'#7#9'btnCancel'#23
|
+'ientWidth'#3'@'#1#8'Position'#7#14'poScreenCenter'#0#7'TBitBtn'#5'btnOK'#23
|
||||||
+'AnchorSideRight.Control'#7#9'btnCancel'#4'Left'#2'k'#6'Height'#2#25#3'Top'#3
|
+'AnchorSideRight.Control'#7#9'btnCancel'#24'AnchorSideBottom.Control'#7#5'Ow'
|
||||||
+#231#0#5'Width'#2'`'#7'Anchors'#11#5'akTop'#7'akRight'#0#19'BorderSpacing.Ri'
|
+'ner'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#3#153#0#6'Height'#2#28
|
||||||
+'ght'#2#5#7'Caption'#6#3'&OK'#7'Default'#9#4'Kind'#7#4'bkOK'#11'ModalResult'
|
+#3'Top'#3#10#1#5'Width'#2'K'#7'Anchors'#11#7'akRight'#8'akBottom'#0#8'AutoSi'
|
||||||
+#2#1#9'NumGlyphs'#2#0#7'OnClick'#7#10'BTNOKCLICK'#8'TabOrder'#2#1#0#0#7'TBit'
|
+'ze'#9#20'BorderSpacing.Around'#2#6#7'Caption'#6#3'&OK'#21'Constraints.MinHe'
|
||||||
+'Btn'#9'btnCancel'#21'AnchorSideTop.Control'#7#19'MultiSelectCheckBox'#18'An'
|
+'ight'#2#25#20'Constraints.MinWidth'#2'K'#7'Default'#9#4'Kind'#7#4'bkOK'#11
|
||||||
+'chorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#7'Listbox'#20
|
+'ModalResult'#2#1#9'NumGlyphs'#2#0#7'OnClick'#7#10'BTNOKCLICK'#8'TabOrder'#2
|
||||||
+'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3#208#0#6'Height'#2#25#3'Top'#3
|
+#1#0#0#7'TBitBtn'#9'btnCancel'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'Anch'
|
||||||
+#231#0#5'Width'#2'`'#7'Anchors'#11#5'akTop'#7'akRight'#0#17'BorderSpacing.To'
|
+'orSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#24
|
||||||
+'p'#2#5#6'Cancel'#9#7'Caption'#6#6'Cancel'#4'Kind'#7#8'bkCancel'#11'ModalRes'
|
+'AnchorSideBottom.Control'#7#5'Owner'#21'AnchorSideBottom.Side'#7#9'asrBotto'
|
||||||
+'ult'#2#2#9'NumGlyphs'#2#0#7'OnClick'#7#14'BTNCANCELCLICK'#8'TabOrder'#2#2#0
|
+'m'#4'Left'#3#234#0#6'Height'#2#28#3'Top'#3#10#1#5'Width'#2'P'#7'Anchors'#11
|
||||||
+#0#5'TEdit'#4'Edit'#4'Left'#2#10#6'Height'#2#25#3'Top'#2#10#5'Width'#3'&'#1#7
|
+#7'akRight'#8'akBottom'#0#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#6'Cance'
|
||||||
+'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#7'Enabled'#8#8'TabOrder'#2#3#0#0
|
+'l'#9#7'Caption'#6#6'Cancel'#21'Constraints.MinHeight'#2#25#20'Constraints.M'
|
||||||
+#8'TListBox'#7'Listbox'#22'AnchorSideLeft.Control'#7#4'Edit'#21'AnchorSideTo'
|
+'inWidth'#2'K'#4'Kind'#7#8'bkCancel'#11'ModalResult'#2#2#9'NumGlyphs'#2#0#7
|
||||||
+'p.Control'#7#4'Edit'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRig'
|
+'OnClick'#7#14'BTNCANCELCLICK'#8'TabOrder'#2#2#0#0#5'TEdit'#4'Edit'#4'Left'#2
|
||||||
+'ht.Control'#7#4'Edit'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2#10#6
|
+#6#6'Height'#2#25#3'Top'#2#6#5'Width'#3'4'#1#5'Align'#7#5'alTop'#7'Anchors'
|
||||||
+'Height'#3#168#0#3'Top'#2'('#5'Width'#3'&'#1#7'Anchors'#11#5'akTop'#6'akLeft'
|
+#11#7'akRight'#0#20'BorderSpacing.Around'#2#6#7'Enabled'#8#8'TabOrder'#2#3#0
|
||||||
+#7'akRight'#8'akBottom'#0#17'BorderSpacing.Top'#2#5#16'ClickOnSelChange'#8#10
|
+#0#8'TListBox'#7'Listbox'#18'AnchorSideTop.Side'#7#9'asrBottom'#20'AnchorSid'
|
||||||
+'OnDblClick'#7#10'BTNOKCLICK'#9'OnKeyDown'#7#14'ListboxKeyDown'#8'TabOrder'#2
|
+'eRight.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'#7#19'MultiSelectCh'
|
||||||
+#0#0#0#9'TCheckBox'#19'MultiSelectCheckBox'#22'AnchorSideLeft.Control'#7#4'E'
|
+'eckBox'#4'Left'#2#6#6'Height'#3#204#0#3'Top'#2'%'#5'Width'#3'4'#1#5'Align'#7
|
||||||
+'dit'#21'AnchorSideTop.Control'#7#7'Listbox'#18'AnchorSideTop.Side'#7#9'asrB'
|
+#5'alTop'#7'Anchors'#11#8'akBottom'#0#20'BorderSpacing.Around'#2#6#16'ClickO'
|
||||||
+'ottom'#4'Left'#2#10#6'Height'#2#13#3'Top'#3#213#0#5'Width'#2'K'#17'BorderSp'
|
+'nSelChange'#8#10'OnDblClick'#7#10'BTNOKCLICK'#9'OnKeyDown'#7#14'ListboxKeyD'
|
||||||
+'acing.Top'#2#5#7'Caption'#6#12'Multi Select'#7'OnClick'#7#24'MultiselectChe'
|
+'own'#8'TabOrder'#2#0#0#0#9'TCheckBox'#19'MultiSelectCheckBox'#22'AnchorSide'
|
||||||
+'ckBoxClick'#8'TabOrder'#2#4#0#0#0
|
+'Left.Control'#7#5'Owner'#18'AnchorSideTop.Side'#7#9'asrBottom'#24'AnchorSid'
|
||||||
|
+'eBottom.Control'#7#9'btnCancel'#4'Left'#2#6#6'Height'#2#13#3'Top'#3#247#0#5
|
||||||
|
+'Width'#2'K'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#20'BorderSpacing.Around'#2
|
||||||
|
+#6#7'Caption'#6#12'Multi Select'#7'OnClick'#7#24'MultiselectCheckBoxClick'#8
|
||||||
|
+'TabOrder'#2#4#0#0#7'TBitBtn'#10'HelpButton'#22'AnchorSideLeft.Control'#7#5
|
||||||
|
+'Owner'#24'AnchorSideBottom.Control'#7#5'Owner'#21'AnchorSideBottom.Side'#7#9
|
||||||
|
+'asrBottom'#4'Left'#2#6#6'Height'#2#28#3'Top'#3#10#1#5'Width'#2'K'#7'Anchors'
|
||||||
|
+#11#6'akLeft'#8'akBottom'#0#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#7'Cap'
|
||||||
|
+'tion'#6#5'&Help'#21'Constraints.MinHeight'#2#25#20'Constraints.MinWidth'#2
|
||||||
|
+'K'#4'Kind'#7#6'bkHelp'#9'NumGlyphs'#2#0#7'OnClick'#7#15'HelpButtonClick'#8
|
||||||
|
+'TabOrder'#2#5#0#0#0
|
||||||
]);
|
]);
|
||||||
|
@ -40,7 +40,7 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
SysUtils, Classes, Controls, Forms, Dialogs, LResources, Buttons, StdCtrls,
|
SysUtils, Classes, Controls, Forms, Dialogs, LResources, Buttons, StdCtrls,
|
||||||
LazarusIdeStrConsts, IDEWindowIntf;
|
LazarusIdeStrConsts, IDEWindowIntf, IDEContextHelpEdit;
|
||||||
|
|
||||||
type
|
type
|
||||||
TViewUnitsEntry = class
|
TViewUnitsEntry = class
|
||||||
@ -54,11 +54,13 @@ type
|
|||||||
{ TViewUnitDialog }
|
{ TViewUnitDialog }
|
||||||
|
|
||||||
TViewUnitDialog = class(TForm)
|
TViewUnitDialog = class(TForm)
|
||||||
|
HelpButton: TBitBtn;
|
||||||
Edit: TEdit;
|
Edit: TEdit;
|
||||||
ListBox: TListBox;
|
ListBox: TListBox;
|
||||||
btnOK: TBitBtn;
|
btnOK: TBitBtn;
|
||||||
btnCancel: TBitBtn;
|
btnCancel: TBitBtn;
|
||||||
MultiSelectCheckBox: TCheckBox;
|
MultiSelectCheckBox: TCheckBox;
|
||||||
|
procedure HelpButtonClick(Sender: TObject);
|
||||||
Procedure btnOKClick(Sender :TObject);
|
Procedure btnOKClick(Sender :TObject);
|
||||||
Procedure btnCancelClick(Sender :TObject);
|
Procedure btnCancelClick(Sender :TObject);
|
||||||
procedure ListboxKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
procedure ListboxKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||||
@ -67,15 +69,12 @@ type
|
|||||||
constructor Create(TheOwner: TComponent); override;
|
constructor Create(TheOwner: TComponent); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function ShowViewUnitsDlg(Entries: TStringList; MultiSelect: boolean;
|
function ShowViewUnitsDlg(Entries: TStringList; MultiSelect: boolean;
|
||||||
const Caption: string): TModalResult;
|
const Caption: string): TModalResult;
|
||||||
// Entries is a list of TViewUnitsEntry(s)
|
// Entries is a list of TViewUnitsEntry(s)
|
||||||
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
|
||||||
function ShowViewUnitsDlg(Entries: TStringList; MultiSelect: boolean;
|
function ShowViewUnitsDlg(Entries: TStringList; MultiSelect: boolean;
|
||||||
const Caption: string): TModalResult;
|
const Caption: string): TModalResult;
|
||||||
var
|
var
|
||||||
@ -140,6 +139,11 @@ Begin
|
|||||||
ModalResult := mrOK;
|
ModalResult := mrOK;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
procedure TViewUnitDialog.HelpButtonClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ShowContextHelpForIDE(Self);
|
||||||
|
end;
|
||||||
|
|
||||||
Procedure TViewUnitDialog.btnCancelClick(Sender : TOBject);
|
Procedure TViewUnitDialog.btnCancelClick(Sender : TOBject);
|
||||||
Begin
|
Begin
|
||||||
IDEDialogLayoutList.SaveLayout(Self);
|
IDEDialogLayoutList.SaveLayout(Self);
|
||||||
@ -159,10 +163,8 @@ begin
|
|||||||
ListBox.Multiselect:=MultiselectCheckBox.Checked;
|
ListBox.Multiselect:=MultiselectCheckBox.Checked;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
{$I viewunit_dlg.lrs}
|
{$I viewunit_dlg.lrs}
|
||||||
|
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user