mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 14:50:32 +02:00
New files for ValueListEditor Strings property editor.
git-svn-id: trunk@44574 -
This commit is contained in:
parent
753201d93a
commit
234935f6bc
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -1650,6 +1650,8 @@ components/ideintf/images/propertygrid/issue_qt.png -text svneol=unset#image/png
|
||||
components/ideintf/images/propertygrid/issue_win32.png -text svneol=unset#image/png
|
||||
components/ideintf/images/propertygrid/issue_wince.png -text svneol=unset#image/png
|
||||
components/ideintf/images/propertygrid/pg_active_row.png -text svneol=unset#image/png
|
||||
components/ideintf/keyvalpropeditdlg.lfm svneol=native#text/plain
|
||||
components/ideintf/keyvalpropeditdlg.pas svneol=native#text/pascal
|
||||
components/ideintf/languages/objinspstrconsts.ca.po svneol=native#text/plain
|
||||
components/ideintf/languages/objinspstrconsts.cs.po svneol=native#text/plain
|
||||
components/ideintf/languages/objinspstrconsts.de.po svneol=native#text/plain
|
||||
|
99
components/ideintf/keyvalpropeditdlg.lfm
Normal file
99
components/ideintf/keyvalpropeditdlg.lfm
Normal file
@ -0,0 +1,99 @@
|
||||
object KeyValPropEditorFrm: TKeyValPropEditorFrm
|
||||
Left = 416
|
||||
Height = 302
|
||||
Top = 487
|
||||
Width = 400
|
||||
Caption = 'KeyValPropEditorFrm'
|
||||
ClientHeight = 302
|
||||
ClientWidth = 400
|
||||
Constraints.MinHeight = 160
|
||||
Constraints.MinWidth = 180
|
||||
OnCreate = FormCreate
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '1.3'
|
||||
object TextGroupBox: TGroupBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = BtnPanel
|
||||
Left = 6
|
||||
Height = 251
|
||||
Top = 6
|
||||
Width = 388
|
||||
Align = alTop
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Around = 6
|
||||
ClientHeight = 247
|
||||
ClientWidth = 384
|
||||
TabOrder = 0
|
||||
object StatusLabel: TLabel
|
||||
AnchorSideBottom.Control = TextGroupBox
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 9
|
||||
Height = 15
|
||||
Top = 226
|
||||
Width = 74
|
||||
Anchors = [akLeft, akBottom]
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'StatusLabel'
|
||||
ParentColor = False
|
||||
end
|
||||
object SortButton: TButton
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideRight.Control = TextGroupBox
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 268
|
||||
Height = 25
|
||||
Top = 6
|
||||
Width = 110
|
||||
Anchors = [akTop, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Sort (not used)'
|
||||
Constraints.MinWidth = 75
|
||||
OnClick = SortButtonClick
|
||||
TabOrder = 0
|
||||
end
|
||||
object ValueListEdit: TValueListEditor
|
||||
AnchorSideLeft.Control = TextGroupBox
|
||||
AnchorSideRight.Control = SortButton
|
||||
AnchorSideBottom.Control = StatusLabel
|
||||
Left = 6
|
||||
Height = 214
|
||||
Top = 6
|
||||
Width = 256
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Around = 6
|
||||
DefaultColWidth = 100
|
||||
FixedCols = 0
|
||||
RowCount = 2
|
||||
TabOrder = 1
|
||||
KeyOptions = [keyEdit, keyDelete]
|
||||
Strings.Strings = (
|
||||
''
|
||||
)
|
||||
ColWidths = (
|
||||
100
|
||||
152
|
||||
)
|
||||
end
|
||||
end
|
||||
object BtnPanel: TButtonPanel
|
||||
Left = 6
|
||||
Height = 33
|
||||
Top = 263
|
||||
Width = 388
|
||||
OKButton.Name = 'OKButton'
|
||||
OKButton.DefaultCaption = True
|
||||
HelpButton.Name = 'HelpButton'
|
||||
HelpButton.DefaultCaption = True
|
||||
CloseButton.Name = 'CloseButton'
|
||||
CloseButton.DefaultCaption = True
|
||||
CancelButton.Name = 'CancelButton'
|
||||
CancelButton.DefaultCaption = True
|
||||
TabOrder = 1
|
||||
ShowButtons = [pbOK, pbCancel]
|
||||
ShowBevel = False
|
||||
end
|
||||
end
|
62
components/ideintf/keyvalpropeditdlg.pas
Normal file
62
components/ideintf/keyvalpropeditdlg.pas
Normal file
@ -0,0 +1,62 @@
|
||||
{
|
||||
*****************************************************************************
|
||||
See the file COPYING.modifiedLGPL.txt, included in this distribution,
|
||||
for details about the license.
|
||||
*****************************************************************************
|
||||
|
||||
Abstract:
|
||||
Dialog for the TStrings property editor for TValueListEditor.
|
||||
}
|
||||
unit KeyValPropEditDlg;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LCLProc, Forms, Controls, Buttons, Dialogs, StdCtrls,
|
||||
TextTools, ObjInspStrConsts, ExtCtrls, ButtonPanel, ValEdit, Grids;
|
||||
|
||||
type
|
||||
|
||||
{ TKeyValPropEditorFrm }
|
||||
|
||||
TKeyValPropEditorFrm = class(TForm)
|
||||
BtnPanel: TButtonPanel;
|
||||
ValueListEdit: TValueListEditor;
|
||||
StatusLabel: TLabel;
|
||||
SortButton: TButton;
|
||||
TextGroupBox: TGroupBox;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure SortButtonClick(Sender: TObject);
|
||||
public
|
||||
end;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TKeyValPropEditorFrm }
|
||||
|
||||
procedure TKeyValPropEditorFrm.FormCreate(Sender: TObject);
|
||||
begin
|
||||
Caption := oisStringsEditorDialog;
|
||||
StatusLabel.Caption := ois0Lines0Chars;
|
||||
//SortButton.Caption := oisSort;
|
||||
// This does not work :(
|
||||
ValueListEdit.Options := ValueListEdit.Options + [goAutoAddRows];
|
||||
end;
|
||||
|
||||
procedure TKeyValPropEditorFrm.SortButtonClick(Sender: TObject);
|
||||
begin
|
||||
if not Assigned(ShowSortSelectionDialogFunc) then
|
||||
begin
|
||||
SortButton.Enabled := False;
|
||||
Exit;
|
||||
end;
|
||||
// ToDo: implement or remove the whole button.
|
||||
end;
|
||||
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user