mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-03 11:39:42 +01:00
implemented allowing resizing of TSynCompletionForm
git-svn-id: trunk@7561 -
This commit is contained in:
parent
da60edbfea
commit
a6441b5840
@ -105,7 +105,8 @@ type
|
||||
X, Y: Integer); override;
|
||||
procedure StringListChange(Sender: TObject);
|
||||
{$IFDEF SYN_LAZARUS}
|
||||
procedure SetFontHeight(NewFontHeight :integer);
|
||||
procedure SetFontHeight(NewFontHeight: integer);
|
||||
procedure DoOnResize; override;
|
||||
{$ENDIF}
|
||||
private
|
||||
Bitmap: TBitmap; // used for drawing
|
||||
@ -665,6 +666,24 @@ begin
|
||||
SetNblinesInWindow(FNbLinesInWindow);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TSynBaseCompletionForm.DoOnResize;
|
||||
var
|
||||
OldHeight: Integer;
|
||||
OldWidth: LongInt;
|
||||
begin
|
||||
inherited DoOnResize;
|
||||
if ([csLoading,csDestroying,csCreating]*ComponentState<>[])
|
||||
or (Bitmap=nil) or (Scroll=nil) then exit;
|
||||
OldHeight:=Bitmap.Height+2;
|
||||
OldWidth:=Bitmap.Width+Scroll.Width;
|
||||
if (OldHeight<>Height) or (OldWidth<>Width) then begin
|
||||
FNbLinesInWindow := (Height-2+(fFontHeight-1)) div fFontHeight;
|
||||
Bitmap.Width := Scroll.Left;
|
||||
Bitmap.Height := Height - 2;
|
||||
Invalidate;
|
||||
end;
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
procedure TSynBaseCompletionForm.SetItemList(const Value: TStrings);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user