mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 09:19:22 +02:00
EditButton: make TabStop also set TabStop of FEdit and make it True by default.
git-svn-id: trunk@44807 -
This commit is contained in:
parent
05eb165133
commit
340635fea2
@ -111,6 +111,7 @@ type
|
|||||||
function GetSelLength: Integer;
|
function GetSelLength: Integer;
|
||||||
function GetSelStart: Integer;
|
function GetSelStart: Integer;
|
||||||
function GetSelText: String;
|
function GetSelText: String;
|
||||||
|
function GetTabStop: Boolean;
|
||||||
function GetText: TCaption;
|
function GetText: TCaption;
|
||||||
function IsCustomGlyph : Boolean;
|
function IsCustomGlyph : Boolean;
|
||||||
|
|
||||||
@ -164,6 +165,7 @@ type
|
|||||||
procedure SetSelLength(AValue: Integer);
|
procedure SetSelLength(AValue: Integer);
|
||||||
procedure SetSelStart(AValue: Integer);
|
procedure SetSelStart(AValue: Integer);
|
||||||
procedure SetSelText(AValue: String);
|
procedure SetSelText(AValue: String);
|
||||||
|
procedure SetTabStop(AValue: Boolean);
|
||||||
procedure SetText(AValue: TCaption);
|
procedure SetText(AValue: TCaption);
|
||||||
protected
|
protected
|
||||||
class function GetControlClassDefaultSize: TSize; override;
|
class function GetControlClassDefaultSize: TSize; override;
|
||||||
@ -264,6 +266,7 @@ type
|
|||||||
property SelLength: Integer read GetSelLength write SetSelLength;
|
property SelLength: Integer read GetSelLength write SetSelLength;
|
||||||
property SelStart: Integer read GetSelStart write SetSelStart;
|
property SelStart: Integer read GetSelStart write SetSelStart;
|
||||||
property SelText: String read GetSelText write SetSelText;
|
property SelText: String read GetSelText write SetSelText;
|
||||||
|
property TabStop: Boolean read GetTabStop write SetTabStop default True;
|
||||||
property Text: TCaption read GetText write SetText;
|
property Text: TCaption read GetText write SetText;
|
||||||
|
|
||||||
property OnChange: TNotifyEvent read FOnEditChange write FOnEditChange;
|
property OnChange: TNotifyEvent read FOnEditChange write FOnEditChange;
|
||||||
@ -1022,6 +1025,11 @@ begin
|
|||||||
Result := FEdit.SelText;
|
Result := FEdit.SelText;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TCustomEditButton.GetTabStop: Boolean;
|
||||||
|
begin
|
||||||
|
Result := inherited TabStop;
|
||||||
|
end;
|
||||||
|
|
||||||
function TCustomEditButton.GetText: TCaption;
|
function TCustomEditButton.GetText: TCaption;
|
||||||
begin
|
begin
|
||||||
Result := FEdit.Text;
|
Result := FEdit.Text;
|
||||||
@ -1540,6 +1548,12 @@ begin
|
|||||||
FEdit.SelText := AValue;
|
FEdit.SelText := AValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCustomEditButton.SetTabStop(AValue: Boolean);
|
||||||
|
begin
|
||||||
|
inherited TabStop := AValue;
|
||||||
|
FEdit.TabStop := AValue;
|
||||||
|
end;
|
||||||
|
|
||||||
constructor TCustomEditButton.Create(AOwner: TComponent);
|
constructor TCustomEditButton.Create(AOwner: TComponent);
|
||||||
var
|
var
|
||||||
B: TBitmap;
|
B: TBitmap;
|
||||||
@ -1554,6 +1568,7 @@ begin
|
|||||||
FButtonOnlyWhenFocused := False;
|
FButtonOnlyWhenFocused := False;
|
||||||
FDirectInput := True;
|
FDirectInput := True;
|
||||||
FIsReadOnly := False;
|
FIsReadOnly := False;
|
||||||
|
TabStop := True;
|
||||||
|
|
||||||
with GetControlClassDefaultSize do
|
with GetControlClassDefaultSize do
|
||||||
SetInitialBounds(0, 0, CX, CY);
|
SetInitialBounds(0, 0, CX, CY);
|
||||||
|
Loading…
Reference in New Issue
Block a user