mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 17:19:18 +02:00
Merged revision(s) 55890 #9ac706fc7a, 55892 #240f1fb4dd from trunk:
LCL: TCustomEditButton: Fixed TDateEdit.SelectNext. Issue #32335 ........ LCL: TTabControl: Fixed AV on creating control. Issue #32455. ........ git-svn-id: branches/fixes_1_8@55899 -
This commit is contained in:
parent
e69fa339ea
commit
d9f1dd6721
@ -502,8 +502,6 @@ type
|
|||||||
property TabHeight: Smallint read FTabHeight write SetTabHeight default 0;
|
property TabHeight: Smallint read FTabHeight write SetTabHeight default 0;
|
||||||
property TabPosition: TTabPosition read FTabPosition write SetTabPosition default tpTop;
|
property TabPosition: TTabPosition read FTabPosition write SetTabPosition default tpTop;
|
||||||
property TabWidth: Smallint read FTabWidth write SetTabWidth default 0;
|
property TabWidth: Smallint read FTabWidth write SetTabWidth default 0;
|
||||||
published
|
|
||||||
property TabStop default true;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TTabSheet }
|
{ TTabSheet }
|
||||||
@ -628,7 +626,7 @@ type
|
|||||||
property TabIndex;
|
property TabIndex;
|
||||||
property TabOrder;
|
property TabOrder;
|
||||||
property TabPosition;
|
property TabPosition;
|
||||||
property TabStop;
|
property TabStop default true;
|
||||||
property TabWidth;
|
property TabWidth;
|
||||||
property Visible;
|
property Visible;
|
||||||
property OnChange;
|
property OnChange;
|
||||||
@ -798,7 +796,7 @@ type
|
|||||||
function GetScrollOpposite: Boolean;
|
function GetScrollOpposite: Boolean;
|
||||||
function GetTabIndex: Integer;
|
function GetTabIndex: Integer;
|
||||||
function GetTabRectWithBorder: TRect;
|
function GetTabRectWithBorder: TRect;
|
||||||
function GetTabStop: Boolean;
|
function GetTabStop: Boolean; override;
|
||||||
procedure SetHotTrack(const AValue: Boolean);
|
procedure SetHotTrack(const AValue: Boolean);
|
||||||
procedure SetImages(const AValue: TCustomImageList);
|
procedure SetImages(const AValue: TCustomImageList);
|
||||||
procedure SetMultiLine(const AValue: Boolean);
|
procedure SetMultiLine(const AValue: Boolean);
|
||||||
@ -810,7 +808,7 @@ type
|
|||||||
procedure SetTabHeight(AValue: Smallint);
|
procedure SetTabHeight(AValue: Smallint);
|
||||||
procedure SetTabPosition(AValue: TTabPosition); override;
|
procedure SetTabPosition(AValue: TTabPosition); override;
|
||||||
procedure SetTabs(const AValue: TStrings);
|
procedure SetTabs(const AValue: TStrings);
|
||||||
procedure SetTabStop(const AValue: Boolean);
|
procedure SetTabStop(AValue: Boolean); override;
|
||||||
procedure SetTabWidth(AValue: Smallint);
|
procedure SetTabWidth(AValue: Smallint);
|
||||||
protected
|
protected
|
||||||
procedure SetOptions(const AValue: TCTabControlOptions); override;
|
procedure SetOptions(const AValue: TCTabControlOptions); override;
|
||||||
@ -820,6 +818,7 @@ type
|
|||||||
procedure Change; override;
|
procedure Change; override;
|
||||||
procedure CreateWnd; override;
|
procedure CreateWnd; override;
|
||||||
procedure DestroyHandle; override;
|
procedure DestroyHandle; override;
|
||||||
|
procedure GetTabOrderList(List: TFPList); override;
|
||||||
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
|
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
|
||||||
procedure SetDragMode(Value: TDragMode); override;
|
procedure SetDragMode(Value: TDragMode); override;
|
||||||
procedure SetTabIndex(Value: Integer); virtual;
|
procedure SetTabIndex(Value: Integer); virtual;
|
||||||
@ -866,7 +865,7 @@ type
|
|||||||
property TabHeight: Smallint read FTabHeight write SetTabHeight default 0;
|
property TabHeight: Smallint read FTabHeight write SetTabHeight default 0;
|
||||||
property TabIndex: Integer read GetTabIndex write SetTabIndex default -1;
|
property TabIndex: Integer read GetTabIndex write SetTabIndex default -1;
|
||||||
property Tabs: TStrings read FTabs write SetTabs;
|
property Tabs: TStrings read FTabs write SetTabs;
|
||||||
property TabStop: Boolean read GetTabStop write SetTabStop default true; // workaround, see #30305
|
property TabStop default true;
|
||||||
property TabWidth: Smallint read FTabWidth write SetTabWidth default 0;
|
property TabWidth: Smallint read FTabWidth write SetTabWidth default 0;
|
||||||
//
|
//
|
||||||
property Align;
|
property Align;
|
||||||
|
@ -1984,7 +1984,6 @@ type
|
|||||||
procedure SetBorderWidth(Value: TBorderWidth);
|
procedure SetBorderWidth(Value: TBorderWidth);
|
||||||
procedure SetParentWindow(const AValue: HWND);
|
procedure SetParentWindow(const AValue: HWND);
|
||||||
procedure SetTabOrder(NewTabOrder: TTabOrder);
|
procedure SetTabOrder(NewTabOrder: TTabOrder);
|
||||||
procedure SetTabStop(NewTabStop: Boolean);
|
|
||||||
procedure SetUseDockManager(const AValue: Boolean);
|
procedure SetUseDockManager(const AValue: Boolean);
|
||||||
procedure UpdateTabOrder(NewTabOrder: TTabOrder);
|
procedure UpdateTabOrder(NewTabOrder: TTabOrder);
|
||||||
procedure Insert(AControl: TControl);
|
procedure Insert(AControl: TControl);
|
||||||
@ -2029,12 +2028,14 @@ type
|
|||||||
WithThemeSpace: Boolean); override;
|
WithThemeSpace: Boolean); override;
|
||||||
procedure GetPreferredSizeClientFrame(out aWidth, aHeight: integer); virtual;
|
procedure GetPreferredSizeClientFrame(out aWidth, aHeight: integer); virtual;
|
||||||
procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override;
|
procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override;
|
||||||
|
function GetTabStop: Boolean; virtual;
|
||||||
function ChildClassAllowed(ChildClass: TClass): boolean; override;
|
function ChildClassAllowed(ChildClass: TClass): boolean; override;
|
||||||
procedure PaintControls(DC: HDC; First: TControl);
|
procedure PaintControls(DC: HDC; First: TControl);
|
||||||
procedure PaintHandler(var TheMessage: TLMPaint);
|
procedure PaintHandler(var TheMessage: TLMPaint);
|
||||||
procedure PaintWindow(DC: HDC); virtual;
|
procedure PaintWindow(DC: HDC); virtual;
|
||||||
procedure CreateBrush; virtual;
|
procedure CreateBrush; virtual;
|
||||||
procedure ScaleControls(Multiplier, Divider: Integer); virtual;
|
procedure ScaleControls(Multiplier, Divider: Integer); virtual;
|
||||||
|
procedure SetTabStop(NewTabStop: Boolean); virtual;
|
||||||
procedure ChangeScale(Multiplier, Divider: Integer); override;
|
procedure ChangeScale(Multiplier, Divider: Integer); override;
|
||||||
protected
|
protected
|
||||||
// messages
|
// messages
|
||||||
@ -2181,7 +2182,7 @@ type
|
|||||||
property Handle: HWND read GetHandle write SetHandle;
|
property Handle: HWND read GetHandle write SetHandle;
|
||||||
property IsResizing: Boolean read GetIsResizing;
|
property IsResizing: Boolean read GetIsResizing;
|
||||||
property TabOrder: TTabOrder read GetTabOrder write SetTabOrder default -1;
|
property TabOrder: TTabOrder read GetTabOrder write SetTabOrder default -1;
|
||||||
property TabStop: Boolean read FTabStop write SetTabStop default false;
|
property TabStop: Boolean read GetTabStop write SetTabStop default false;
|
||||||
property OnAlignInsertBefore: TAlignInsertBeforeEvent read FOnAlignInsertBefore write FOnAlignInsertBefore;
|
property OnAlignInsertBefore: TAlignInsertBeforeEvent read FOnAlignInsertBefore write FOnAlignInsertBefore;
|
||||||
property OnAlignPosition: TAlignPositionEvent read FOnAlignPosition write FOnAlignPosition;
|
property OnAlignPosition: TAlignPositionEvent read FOnAlignPosition write FOnAlignPosition;
|
||||||
property OnDockDrop: TDockDropEvent read FOnDockDrop write FOnDockDrop;
|
property OnDockDrop: TDockDropEvent read FOnDockDrop write FOnDockDrop;
|
||||||
|
@ -103,6 +103,7 @@ type
|
|||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
|
procedure GetTabOrderList(List: TFPList); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TEditButton }
|
{ TEditButton }
|
||||||
@ -1077,6 +1078,7 @@ begin
|
|||||||
inherited Create(AOwner);
|
inherited Create(AOwner);
|
||||||
FButtonOnlyWhenFocused := False;
|
FButtonOnlyWhenFocused := False;
|
||||||
FocusOnButtonClick := False;
|
FocusOnButtonClick := False;
|
||||||
|
TabStop := True;
|
||||||
|
|
||||||
SetInitialBounds(0, 0, GetControlClassDefaultSize.CX, GetControlClassDefaultSize.CY);
|
SetInitialBounds(0, 0, GetControlClassDefaultSize.CX, GetControlClassDefaultSize.CY);
|
||||||
|
|
||||||
@ -1094,6 +1096,12 @@ begin
|
|||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCustomEditButton.GetTabOrderList(List: TFPList);
|
||||||
|
begin
|
||||||
|
// just the TCustomEditButton as container should be tabable, see issue #32335
|
||||||
|
// so no inherited adding of child controls
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{ TCustomControlFilterEdit }
|
{ TCustomControlFilterEdit }
|
||||||
|
|
||||||
|
@ -120,7 +120,6 @@ type
|
|||||||
function GetSelLength: Integer;
|
function GetSelLength: Integer;
|
||||||
function GetSelStart: Integer;
|
function GetSelStart: Integer;
|
||||||
function GetSelText: String;
|
function GetSelText: String;
|
||||||
function GetTabStop: Boolean;
|
|
||||||
function GetTextHint: TTranslateString;
|
function GetTextHint: TTranslateString;
|
||||||
function GetTextHintFontColor: TColor; //Remove in 1.9
|
function GetTextHintFontColor: TColor; //Remove in 1.9
|
||||||
function GetTextHintFontStyle: TFontStyles; //Remove in 1.9
|
function GetTextHintFontStyle: TFontStyles; //Remove in 1.9
|
||||||
@ -175,7 +174,6 @@ type
|
|||||||
procedure SetSelStart(AValue: Integer);
|
procedure SetSelStart(AValue: Integer);
|
||||||
procedure SetSelText(AValue: String);
|
procedure SetSelText(AValue: String);
|
||||||
procedure SetSpacing(const Value: integer);
|
procedure SetSpacing(const Value: integer);
|
||||||
procedure SetTabStop(AValue: Boolean);
|
|
||||||
procedure SetTextHint(AValue: TTranslateString);
|
procedure SetTextHint(AValue: TTranslateString);
|
||||||
protected
|
protected
|
||||||
procedure CalculatePreferredSize(var PreferredWidth, PreferredHeight: integer;
|
procedure CalculatePreferredSize(var PreferredWidth, PreferredHeight: integer;
|
||||||
@ -237,12 +235,14 @@ type
|
|||||||
function EditCanModify: Boolean; virtual;
|
function EditCanModify: Boolean; virtual;
|
||||||
procedure GetSel(out _SelStart: Integer; out _SelStop: Integer);
|
procedure GetSel(out _SelStart: Integer; out _SelStop: Integer);
|
||||||
function GetSpacing: Integer; virtual;
|
function GetSpacing: Integer; virtual;
|
||||||
|
function GetTabStop: Boolean; override;
|
||||||
procedure SetSel(const _SelStart: Integer; _SelStop: Integer);
|
procedure SetSel(const _SelStart: Integer; _SelStop: Integer);
|
||||||
procedure Loaded; override;
|
procedure Loaded; override;
|
||||||
procedure Reset; virtual;
|
procedure Reset; virtual;
|
||||||
procedure SetAutoSize(AValue: Boolean); override;
|
procedure SetAutoSize(AValue: Boolean); override;
|
||||||
procedure SetColor(AValue: TColor); reintroduce;
|
procedure SetColor(AValue: TColor); reintroduce;
|
||||||
procedure SetCursor(AValue: TCursor); override;
|
procedure SetCursor(AValue: TCursor); override;
|
||||||
|
procedure SetTabStop(AValue: Boolean); override;
|
||||||
procedure ShouldAutoAdjust(var AWidth, AHeight: Boolean); override;
|
procedure ShouldAutoAdjust(var AWidth, AHeight: Boolean); override;
|
||||||
|
|
||||||
property AutoSelect: Boolean read GetAutoSelect write SetAutoSelect default True;
|
property AutoSelect: Boolean read GetAutoSelect write SetAutoSelect default True;
|
||||||
@ -847,6 +847,11 @@ begin
|
|||||||
FEdit.Cursor := AValue;
|
FEdit.Cursor := AValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCustomAbstractGroupedEdit.SetTabStop(AValue: Boolean);
|
||||||
|
begin
|
||||||
|
FEdit.TabStop := AValue;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCustomAbstractGroupedEdit.ShouldAutoAdjust(var AWidth,
|
procedure TCustomAbstractGroupedEdit.ShouldAutoAdjust(var AWidth,
|
||||||
AHeight: Boolean);
|
AHeight: Boolean);
|
||||||
begin
|
begin
|
||||||
@ -1129,11 +1134,6 @@ begin
|
|||||||
if not (csLoading in ComponentState) then UpdateSpacing;
|
if not (csLoading in ComponentState) then UpdateSpacing;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomAbstractGroupedEdit.SetTabStop(AValue: Boolean);
|
|
||||||
begin
|
|
||||||
FEdit.TabStop := AValue;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TCustomAbstractGroupedEdit.SetTextHint(AValue: TTranslateString);
|
procedure TCustomAbstractGroupedEdit.SetTextHint(AValue: TTranslateString);
|
||||||
begin
|
begin
|
||||||
FEdit.TextHint := AValue;
|
FEdit.TextHint := AValue;
|
||||||
|
@ -532,9 +532,10 @@ begin
|
|||||||
FTabs.Assign(AValue);
|
FTabs.Assign(AValue);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TTabControl.SetTabStop(const AValue: Boolean);
|
procedure TTabControl.SetTabStop(AValue: Boolean);
|
||||||
begin
|
begin
|
||||||
TTabControlNoteBookStrings(FTabs).NoteBook.TabStop := AValue;
|
if Assigned(FTabs) then
|
||||||
|
TTabControlNoteBookStrings(FTabs).NoteBook.TabStop := AValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TTabControl.SetTabWidth(AValue: Smallint);
|
procedure TTabControl.SetTabWidth(AValue: Smallint);
|
||||||
@ -604,6 +605,14 @@ begin
|
|||||||
EndUpdate;
|
EndUpdate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TTabControl.GetTabOrderList(List: TFPList);
|
||||||
|
begin
|
||||||
|
// just the TTabControlNoteBookStrings not the container should be tabable, see issue #32455
|
||||||
|
List.Remove(Self);
|
||||||
|
if Assigned(FTabs) then
|
||||||
|
List.Add(TTabControlNoteBookStrings(FTabs).NoteBook);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TTabControl.Notification(AComponent: TComponent;
|
procedure TTabControl.Notification(AComponent: TComponent;
|
||||||
Operation: TOperation);
|
Operation: TOperation);
|
||||||
begin
|
begin
|
||||||
@ -754,8 +763,7 @@ begin
|
|||||||
FImageChangeLink := TChangeLink.Create;
|
FImageChangeLink := TChangeLink.Create;
|
||||||
FImageChangeLink.OnChange := @ImageListChange;
|
FImageChangeLink.OnChange := @ImageListChange;
|
||||||
FTabs := CreateTabNoteBookStrings;
|
FTabs := CreateTabNoteBookStrings;
|
||||||
TWinControl(Self).TabStop := False; // workaround, see #30305
|
TabStop := True;
|
||||||
TTabControlNoteBookStrings(FTabs).NoteBook.TabStop := True;
|
|
||||||
with GetControlClassDefaultSize do
|
with GetControlClassDefaultSize do
|
||||||
SetInitialBounds(0, 0, CX, CY);
|
SetInitialBounds(0, 0, CX, CY);
|
||||||
BorderWidth:=0;
|
BorderWidth:=0;
|
||||||
|
@ -3901,6 +3901,11 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TWinControl.GetTabStop: Boolean;
|
||||||
|
begin
|
||||||
|
Result := FTabStop;
|
||||||
|
end;
|
||||||
|
|
||||||
{-------------------------------------------------------------------------------
|
{-------------------------------------------------------------------------------
|
||||||
function TWinControl.ChildClassAllowed(ChildClass: TClass): boolean;
|
function TWinControl.ChildClassAllowed(ChildClass: TClass): boolean;
|
||||||
|
|
||||||
@ -4237,15 +4242,6 @@ begin
|
|||||||
UpdateTabOrder(NewTabOrder);
|
UpdateTabOrder(NewTabOrder);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TWinControl.SetTabStop(NewTabStop: Boolean);
|
|
||||||
begin
|
|
||||||
if FTabStop = NewTabStop then
|
|
||||||
Exit;
|
|
||||||
FTabStop := NewTabStop;
|
|
||||||
UpdateTabOrder(FTabOrder);
|
|
||||||
Perform(CM_TABSTOPCHANGED, 0, 0);
|
|
||||||
end;
|
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
TControl UpdateTabOrder
|
TControl UpdateTabOrder
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
@ -4980,6 +4976,15 @@ begin
|
|||||||
Controls[i].ChangeScale(Multiplier, Divider);
|
Controls[i].ChangeScale(Multiplier, Divider);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TWinControl.SetTabStop(NewTabStop: Boolean);
|
||||||
|
begin
|
||||||
|
if FTabStop = NewTabStop then
|
||||||
|
Exit;
|
||||||
|
FTabStop := NewTabStop;
|
||||||
|
UpdateTabOrder(FTabOrder);
|
||||||
|
Perform(CM_TABSTOPCHANGED, 0, 0);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TWinControl.ChangeScale(Multiplier, Divider: Integer);
|
procedure TWinControl.ChangeScale(Multiplier, Divider: Integer);
|
||||||
var
|
var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
|
Loading…
Reference in New Issue
Block a user