You've already forked lazarus-ccr
jvcllaz: Increase ItemHeight of TDBLookupList (was truncated in Linux).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6960 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -1,95 +1,114 @@
|
|||||||
object Form1: TForm1
|
object Form1: TForm1
|
||||||
Left = 298
|
Left = 298
|
||||||
Height = 331
|
Height = 475
|
||||||
Top = 119
|
Top = 119
|
||||||
Width = 433
|
Width = 433
|
||||||
Caption = 'JvDBLookup controls'
|
Caption = 'JvDBLookup controls'
|
||||||
ClientHeight = 331
|
ClientHeight = 475
|
||||||
ClientWidth = 433
|
ClientWidth = 433
|
||||||
OnShow = FormShow
|
OnShow = FormShow
|
||||||
LCLVersion = '2.1.0.0'
|
LCLVersion = '2.1.0.0'
|
||||||
object DBGrid1: TDBGrid
|
object DBGrid1: TDBGrid
|
||||||
AnchorSideLeft.Control = Owner
|
|
||||||
AnchorSideTop.Control = Owner
|
|
||||||
AnchorSideRight.Control = Owner
|
|
||||||
AnchorSideRight.Side = asrBottom
|
|
||||||
AnchorSideBottom.Control = DBEdit1
|
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 129
|
Height = 236
|
||||||
Top = 8
|
Top = 8
|
||||||
Width = 417
|
Width = 417
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Align = alClient
|
||||||
BorderSpacing.Around = 8
|
Anchors = [akTop, akLeft, akRight]
|
||||||
|
BorderSpacing.Left = 8
|
||||||
|
BorderSpacing.Top = 8
|
||||||
|
BorderSpacing.Right = 8
|
||||||
|
BorderSpacing.Bottom = 2
|
||||||
Color = clWindow
|
Color = clWindow
|
||||||
Columns = <>
|
Columns = <>
|
||||||
DataSource = DSCities
|
DataSource = DSCities
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object JvDBLookupList1: TJvDBLookupList
|
object Panel1: TPanel
|
||||||
AnchorSideLeft.Control = Owner
|
|
||||||
AnchorSideTop.Side = asrBottom
|
|
||||||
AnchorSideRight.Control = Owner
|
|
||||||
AnchorSideRight.Side = asrBottom
|
|
||||||
AnchorSideBottom.Control = JvDBLookupCombo1
|
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 116
|
Height = 214
|
||||||
Top = 176
|
Top = 253
|
||||||
Width = 417
|
Width = 417
|
||||||
|
Align = alBottom
|
||||||
BorderSpacing.Left = 8
|
BorderSpacing.Left = 8
|
||||||
BorderSpacing.Top = 8
|
BorderSpacing.Top = 2
|
||||||
BorderSpacing.Right = 8
|
BorderSpacing.Right = 8
|
||||||
DataField = 'CITY_ID'
|
BorderSpacing.Bottom = 8
|
||||||
DataSource = DSSomeData
|
BevelOuter = bvNone
|
||||||
DisplayEmpty = 'none...'
|
ClientHeight = 214
|
||||||
EmptyItemColor = clSilver
|
ClientWidth = 417
|
||||||
Anchors = [akLeft, akRight, akBottom]
|
|
||||||
ImageList = ImageList1
|
|
||||||
LookupField = 'ID'
|
|
||||||
LookupDisplay = 'NAME;COUNTRY'
|
|
||||||
LookupSource = DSCities
|
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
UseRecordCount = True
|
object DBEdit1: TDBEdit
|
||||||
OnGetImageIndex = JvDBLookupList1GetImageIndex
|
AnchorSideLeft.Control = Panel1
|
||||||
|
AnchorSideTop.Control = Panel1
|
||||||
|
Left = 0
|
||||||
|
Height = 23
|
||||||
|
Top = 0
|
||||||
|
Width = 112
|
||||||
|
DataField = 'CITY_ID'
|
||||||
|
DataSource = DSSomeData
|
||||||
|
CharCase = ecNormal
|
||||||
|
MaxLength = 0
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object JvDBLookupList1: TJvDBLookupList
|
||||||
|
AnchorSideLeft.Control = Panel1
|
||||||
|
AnchorSideTop.Control = DBEdit1
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
AnchorSideRight.Control = Panel1
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
AnchorSideBottom.Control = JvDBLookupCombo1
|
||||||
|
Left = 0
|
||||||
|
Height = 148
|
||||||
|
Top = 31
|
||||||
|
Width = 417
|
||||||
|
BorderSpacing.Top = 8
|
||||||
|
DataField = 'CITY_ID'
|
||||||
|
DataSource = DSSomeData
|
||||||
|
DisplayEmpty = 'none...'
|
||||||
|
EmptyItemColor = clSilver
|
||||||
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
|
ImageList = ImageList1
|
||||||
|
LookupField = 'ID'
|
||||||
|
LookupDisplay = 'NAME;COUNTRY'
|
||||||
|
LookupSource = DSCities
|
||||||
|
TabOrder = 1
|
||||||
|
UseRecordCount = True
|
||||||
|
OnGetImageIndex = JvDBLookupList1GetImageIndex
|
||||||
|
end
|
||||||
|
object JvDBLookupCombo1: TJvDBLookupCombo
|
||||||
|
AnchorSideLeft.Control = Panel1
|
||||||
|
AnchorSideRight.Control = Panel1
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
AnchorSideBottom.Control = Panel1
|
||||||
|
AnchorSideBottom.Side = asrBottom
|
||||||
|
Left = 0
|
||||||
|
Height = 23
|
||||||
|
Top = 191
|
||||||
|
Width = 417
|
||||||
|
DisplayAllFields = True
|
||||||
|
DataField = 'CITY_ID'
|
||||||
|
DataSource = DSSomeData
|
||||||
|
DisplayEmpty = 'none...'
|
||||||
|
EmptyItemColor = clSilver
|
||||||
|
Anchors = [akLeft, akRight, akBottom]
|
||||||
|
ImageList = ImageList1
|
||||||
|
LookupField = 'ID'
|
||||||
|
LookupDisplay = 'NAME;COUNTRY'
|
||||||
|
LookupSource = DSCities
|
||||||
|
TabOrder = 2
|
||||||
|
UseRecordCount = True
|
||||||
|
OnGetImageIndex = JvDBLookupList1GetImageIndex
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object DBEdit1: TDBEdit
|
object Splitter1: TSplitter
|
||||||
AnchorSideLeft.Control = DBGrid1
|
Cursor = crVSplit
|
||||||
AnchorSideTop.Side = asrBottom
|
Left = 0
|
||||||
AnchorSideBottom.Control = JvDBLookupList1
|
Height = 5
|
||||||
Left = 8
|
Top = 246
|
||||||
Height = 23
|
Width = 433
|
||||||
Top = 145
|
Align = alBottom
|
||||||
Width = 112
|
ResizeAnchor = akBottom
|
||||||
DataField = 'CITY_ID'
|
|
||||||
DataSource = DSSomeData
|
|
||||||
Anchors = [akLeft, akBottom]
|
|
||||||
CharCase = ecNormal
|
|
||||||
MaxLength = 0
|
|
||||||
TabOrder = 2
|
|
||||||
end
|
|
||||||
object JvDBLookupCombo1: TJvDBLookupCombo
|
|
||||||
AnchorSideLeft.Control = Owner
|
|
||||||
AnchorSideRight.Control = Owner
|
|
||||||
AnchorSideRight.Side = asrBottom
|
|
||||||
AnchorSideBottom.Control = Owner
|
|
||||||
AnchorSideBottom.Side = asrBottom
|
|
||||||
Left = 8
|
|
||||||
Height = 23
|
|
||||||
Top = 300
|
|
||||||
Width = 417
|
|
||||||
BorderSpacing.Around = 8
|
|
||||||
DisplayAllFields = True
|
|
||||||
DataField = 'CITY_ID'
|
|
||||||
DataSource = DSSomeData
|
|
||||||
DisplayEmpty = 'none...'
|
|
||||||
EmptyItemColor = clSilver
|
|
||||||
Anchors = [akLeft, akRight, akBottom]
|
|
||||||
ImageList = ImageList1
|
|
||||||
LookupField = 'ID'
|
|
||||||
LookupDisplay = 'NAME;COUNTRY'
|
|
||||||
LookupSource = DSCities
|
|
||||||
TabOrder = 3
|
|
||||||
UseRecordCount = True
|
|
||||||
OnGetImageIndex = JvDBLookupList1GetImageIndex
|
|
||||||
end
|
end
|
||||||
object SomeData: TBufDataset
|
object SomeData: TBufDataset
|
||||||
FieldDefs = <
|
FieldDefs = <
|
||||||
@ -97,8 +116,8 @@ object Form1: TForm1
|
|||||||
Name = 'CITY_ID'
|
Name = 'CITY_ID'
|
||||||
DataType = ftInteger
|
DataType = ftInteger
|
||||||
end>
|
end>
|
||||||
left = 183
|
left = 168
|
||||||
top = 134
|
top = 32
|
||||||
end
|
end
|
||||||
object Cities: TBufDataset
|
object Cities: TBufDataset
|
||||||
FieldDefs = <
|
FieldDefs = <
|
||||||
@ -120,12 +139,12 @@ object Form1: TForm1
|
|||||||
Name = 'FLAG'
|
Name = 'FLAG'
|
||||||
DataType = ftInteger
|
DataType = ftInteger
|
||||||
end>
|
end>
|
||||||
left = 264
|
left = 249
|
||||||
top = 134
|
top = 32
|
||||||
end
|
end
|
||||||
object ImageList1: TImageList
|
object ImageList1: TImageList
|
||||||
left = 224
|
left = 209
|
||||||
top = 240
|
top = 138
|
||||||
Bitmap = {
|
Bitmap = {
|
||||||
4C69060000001000000010000000000000000000000000000000000000000000
|
4C69060000001000000010000000000000000000000000000000000000000000
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
@ -324,12 +343,12 @@ object Form1: TForm1
|
|||||||
end
|
end
|
||||||
object DSSomeData: TDataSource
|
object DSSomeData: TDataSource
|
||||||
DataSet = SomeData
|
DataSet = SomeData
|
||||||
left = 183
|
left = 168
|
||||||
top = 184
|
top = 82
|
||||||
end
|
end
|
||||||
object DSCities: TDataSource
|
object DSCities: TDataSource
|
||||||
DataSet = Cities
|
DataSet = Cities
|
||||||
left = 264
|
left = 249
|
||||||
top = 184
|
top = 82
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -21,7 +21,9 @@ type
|
|||||||
ImageList1: TImageList;
|
ImageList1: TImageList;
|
||||||
JvDBLookupCombo1: TJvDBLookupCombo;
|
JvDBLookupCombo1: TJvDBLookupCombo;
|
||||||
JvDBLookupList1: TJvDBLookupList;
|
JvDBLookupList1: TJvDBLookupList;
|
||||||
|
Panel1: TPanel;
|
||||||
SomeData: TBufDataset;
|
SomeData: TBufDataset;
|
||||||
|
Splitter1: TSplitter;
|
||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
procedure JvDBLookupList1GetImageIndex(Sender: TObject; IsEmpty: Boolean;
|
procedure JvDBLookupList1GetImageIndex(Sender: TObject; IsEmpty: Boolean;
|
||||||
var ImageIndex: Integer; var TextMargin: Integer);
|
var ImageIndex: Integer; var TextMargin: Integer);
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
<Description Value="Database controls of the JVCL library (https://sourceforge.net/projects/jvcl/) (runtime code):
|
<Description Value="Database controls of the JVCL library (https://sourceforge.net/projects/jvcl/) (runtime code):
|
||||||
- Search edit, Calc edit
|
- Search edit, Calc edit
|
||||||
- DB treeview
|
- DB treeview
|
||||||
|
- DB lookup controls
|
||||||
- Hypertext components
|
- Hypertext components
|
||||||
"/>
|
"/>
|
||||||
<License Value="The JVCL is released in accordance with the MPL 1.1 license. To get your own copy or read it, go to http://www.mozilla.org/MPL/MPL-1.1.html. "/>
|
<License Value="The JVCL is released in accordance with the MPL 1.1 license. To get your own copy or read it, go to http://www.mozilla.org/MPL/MPL-1.1.html. "/>
|
||||||
|
@ -1068,7 +1068,7 @@ end;
|
|||||||
function TJvLookupControl.DefaultTextHeight: Integer;
|
function TJvLookupControl.DefaultTextHeight: Integer;
|
||||||
begin
|
begin
|
||||||
//Result := Screen.SystemFont.GetTextHeight('Mg'); //Canvas.TextHeight('Mg');
|
//Result := Screen.SystemFont.GetTextHeight('Mg'); //Canvas.TextHeight('Mg');
|
||||||
Result := Font.GetTextHeight('Mg');
|
Result := Font.GetTextHeight('Mg') + 4;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TJvLookupControl.GetTextHeight: Integer;
|
function TJvLookupControl.GetTextHeight: Integer;
|
||||||
|
Reference in New Issue
Block a user