mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 14:59:30 +02:00
ideintf: implement ListMeasureHeight for TPropertyEditor
git-svn-id: trunk@22131 -
This commit is contained in:
parent
42cdf709b5
commit
057cc0092d
@ -383,6 +383,8 @@ type
|
||||
procedure ValueComboBoxCloseUp(Sender: TObject);
|
||||
procedure ValueComboBoxGetItems(Sender: TObject);
|
||||
procedure ValueButtonClick(Sender: TObject);
|
||||
procedure ValueComboBoxMeasureItem(Control: TWinControl; Index: Integer;
|
||||
var AHeight: Integer);
|
||||
procedure ValueComboBoxDrawItem(Control: TWinControl; Index: Integer;
|
||||
ARect: TRect; State: TOwnerDrawState);
|
||||
procedure OnIdle(Sender: TObject; var Done: Boolean);
|
||||
@ -883,6 +885,7 @@ begin
|
||||
OnMouseUp:=@ValueComboBoxMouseUp;
|
||||
OnGetItems:=@ValueComboBoxGetItems;
|
||||
OnCloseUp:=@ValueComboBoxCloseUp;
|
||||
OnMeasureItem:=@ValueComboBoxMeasureItem;
|
||||
OnDrawItem:=@ValueComboBoxDrawItem;
|
||||
end;
|
||||
|
||||
@ -1444,6 +1447,18 @@ begin
|
||||
DoCallEdit;
|
||||
end;
|
||||
|
||||
procedure TOICustomPropertyGrid.ValueComboBoxMeasureItem(Control: TWinControl;
|
||||
Index: Integer; var AHeight: Integer);
|
||||
var
|
||||
CurRow: TOIPropertyGridRow;
|
||||
begin
|
||||
if (FItemIndex >= 0) and (FItemIndex < FRows.Count) then
|
||||
begin
|
||||
CurRow := Rows[FItemIndex];
|
||||
CurRow.Editor.ListMeasureHeight('Fj', Index, ValueComboBox.Canvas, AHeight);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TOICustomPropertyGrid.SetItemIndex(NewIndex:integer);
|
||||
var
|
||||
NewRow: TOIPropertyGridRow;
|
||||
|
@ -2789,14 +2789,14 @@ end;
|
||||
object inspector's drop down list editor. You don't need to
|
||||
override the two measure procedures if the default width or height don't
|
||||
need to be changed. }
|
||||
procedure TPropertyEditor.ListMeasureHeight(const AValue:ansistring;
|
||||
Index:integer; ACanvas:TCanvas; var AHeight:Integer);
|
||||
procedure TPropertyEditor.ListMeasureHeight(const AValue: AnsiString;
|
||||
Index: Integer; ACanvas: TCanvas; var AHeight: Integer);
|
||||
begin
|
||||
//
|
||||
AHeight := ACanvas.TextHeight(AValue);
|
||||
end;
|
||||
|
||||
procedure TPropertyEditor.ListMeasureWidth(const AValue:ansistring;
|
||||
Index:integer; ACanvas:TCanvas; var AWidth:Integer);
|
||||
procedure TPropertyEditor.ListMeasureWidth(const AValue: AnsiString;
|
||||
Index: Integer; ACanvas: TCanvas; var AWidth: Integer);
|
||||
begin
|
||||
//
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user