Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • Lazarus Lazarus
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 2,083
    • Issues 2,083
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 8
    • Merge requests 8
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar

GitLab 15.0 is launching on May 22! This version brings many exciting improvements, but also removes deprecated features and introduces breaking changes that may impact your workflow. To see what is being deprecated and removed, please visit Breaking changes in 15.0 and Deprecations.

  • FPC
  • Lazarus
  • LazarusLazarus
  • Issues
  • #30340
Closed
Open
Created Jul 04, 2016 by FPC Admin account@fpc_adminOwner

TFontDialog fdLimitSize for font-size doesn't work

Original Reporter info from Mantis: rvk
  • Reporter name: Rik van Kekem

Description:

When setting fdLimitSize in options and MaxFontSize and MinFontSize on TFontDialog you would expect the dialog to limit the font-size. Instead the font-size listbox is empty and when choosing a valid font-size the OK-button gives a "Size must be between 0 and 0 points." error.

Steps to reproduce:

Empty project with one button:

procedure TForm1.Button1Click(Sender: TObject);
var
  Fd: TFontDialog;
begin
  Fd := TFontDialog.Create(nil);
  try
    Fd.Font.Name := 'Arial';
    Fd.Font.Size := 9;
    Fd.MinFontSize := 8;
    Fd.MaxFontSize := 24;
    Fd.Options := Fd.Options + [fdLimitSize];
    if Fd.Execute then;
  finally
    Fd.Free;
  end;
end;

Press button and choose a valid (9) point size and press ok.

Additional information:

In lazarus/lcl/interfaces/win32/win32wsdialogs.pp the fdLimitSize is implemented correctly but nowhere is the setting of MaxFontSize/MinFontSize to be found. Without it the dialog check for Min 0 and Max 0.

[code]if fdLimitSize in Options then Result := Result or CF_LIMITSIZE;[/code]

Mantis conversion info:

  • Mantis ID: 30340
  • OS: Windows
  • Version: 1.6.1 (SVN)
  • Fixed in version: 1.6.2
  • Fixed in revision: r52649 (#61f5442a)
  • Target version: 1.6.2
Assignee
Assign to
Time tracking