components: TSynBaseCompletionForm: add DrawBorderColor, make DrawBorderWidth public. Issue #29268. Modified patch by regs

git-svn-id: trunk@51061 -
This commit is contained in:
ondrej 2015-12-28 08:14:17 +00:00
parent c689e1582c
commit fe3244449c

View File

@ -127,6 +127,7 @@ type
FClSelect: TColor;
FCaseSensitive: boolean;
FBackgroundColor: TColor;
FDrawBorderColor: TColor;
FOnSearchPosition: TSynBaseCompletionSearchPosition;
FOnKeyCompletePrefix: TNotifyEvent;
FOnKeyNextChar: TNotifyEvent;
@ -189,7 +190,6 @@ type
procedure RegisterHandlers(EditOnly: Boolean = False);
procedure UnRegisterHandlers(EditOnly: Boolean = False);
procedure SetVisible(Value: Boolean); override;
property DrawBorderWidth: Integer read FDrawBorderWidth write SetDrawBorderWidth;
procedure IncHintLock;
procedure DecHintLock;
procedure DoOnDragResize(Sender: TObject);
@ -225,6 +225,8 @@ type
property OnKeyPrevChar: TNotifyEvent read FOnKeyPrevChar write FOnKeyPrevChar;// e.g. arrow left
property OnPositionChanged: TNotifyEvent read FOnPositionChanged write FOnPositionChanged;
property BackgroundColor: TColor read FBackgroundColor write SetBackgroundColor;
property DrawBorderColor: TColor read FDrawBorderColor write FDrawBorderColor;
property DrawBorderWidth: Integer read FDrawBorderWidth write SetDrawBorderWidth;
property TextColor: TColor read FTextColor write FTextColor;
property TextSelectedColor: TColor
read FTextSelectedColor write FTextSelectedColor;
@ -619,6 +621,7 @@ begin
Caption:='Completion';
Color:=clNone;
FBackgroundColor:=clWhite;
FDrawBorderColor:=clBlack;
FHint := TSynBaseCompletionHint.Create(Self);
FHint.FormStyle := fsSystemStayOnTop;
{$IFDEF HintClickWorkaround}
@ -941,7 +944,7 @@ begin
// draw a rectangle around the window
if DrawBorderWidth > 0 then
begin
Canvas.Pen.Color := TextColor;
Canvas.Pen.Color := DrawBorderColor;
Canvas.Pen.Width := DrawBorderWidth;
Canvas.Moveto(0, 0);
Canvas.LineTo(Width - 1, 0);