mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-07-20 09:45:59 +02:00
LCL-Win32: Take caption of an autosized GroupBox into account when calculating width. Issue #20447, patch from Henry Vermaak
git-svn-id: trunk@45795 -
This commit is contained in:
parent
bcb2f4643e
commit
634b35e8e6
@ -54,6 +54,9 @@ type
|
|||||||
const AParams: TCreateParams): HWND; override;
|
const AParams: TCreateParams): HWND; override;
|
||||||
class procedure SetBiDiMode(const AWinControl: TWinControl; UseRightToLeftAlign,
|
class procedure SetBiDiMode(const AWinControl: TWinControl; UseRightToLeftAlign,
|
||||||
UseRightToLeftReading, UseRightToLeftScrollBar : Boolean); override;
|
UseRightToLeftReading, UseRightToLeftScrollBar : Boolean); override;
|
||||||
|
class procedure GetPreferredSize(const AWinControl: TWinControl;
|
||||||
|
var PreferredWidth, PreferredHeight: integer;
|
||||||
|
WithThemeSpace: Boolean); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TWin32WSGroupBox }
|
{ TWin32WSGroupBox }
|
||||||
@ -560,6 +563,17 @@ begin
|
|||||||
RecreateWnd(AWinControl);
|
RecreateWnd(AWinControl);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
class procedure TWin32WSCustomGroupBox.GetPreferredSize(
|
||||||
|
const AWinControl: TWinControl; var PreferredWidth, PreferredHeight: integer;
|
||||||
|
WithThemeSpace: Boolean);
|
||||||
|
begin
|
||||||
|
if MeasureText(AWinControl, AWinControl.Caption, PreferredWidth,
|
||||||
|
PreferredHeight) then begin
|
||||||
|
PreferredWidth += 19;
|
||||||
|
PreferredHeight += 4;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
{ TWin32WSCustomListBox }
|
{ TWin32WSCustomListBox }
|
||||||
|
|
||||||
function ListBoxWindowProc(Window: HWnd; Msg: UInt; WParam: Windows.WParam;
|
function ListBoxWindowProc(Window: HWnd; Msg: UInt; WParam: Windows.WParam;
|
||||||
|
Loading…
Reference in New Issue
Block a user