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