Sign in Join
Wiki copytemporary

Lazarus 4.0 release notes: what changed

Revision 2 to 3. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
11**Lazarus 4.0 is not yet released. This page is under construction!**
22
3-## LCL Interfaces Changes
4-
5-## LCL Changes
6-
7-### TTaskDialog
8-
9-#### Support for Queries
10-
11-- Because the unit LCLTaskDialog has been deprecated, the query capabilities of LCLTaskDialog.TTaskDialog have been added to Dialogs.TTaskDialog, albeit with a slightly different implementation.
12- - New flag tfQuery: adds a query (in the form of a combobox) to the dialog.
13- - New property QueryChoices (TStrings): sets the predefined answers.
14- - New property QueryItemIndex: sets the ItemIndex of the combobox and holds said ItemIndex when the dialog is closed.
15- - New flag tfQueryFixedChoices: control whether or not the user can add his/hers own text to the combobox.
16- - New property QueryResult: holds the text of the choice made when the dialog closes.
17- - New flag tfSimpleQuery: adds a single line Edit to the dialog. Note: this flag is mutually exclusive with the tfQuery flag.
18- - New property SimpleQuery: sets the initial text of the Edit.
19- - New property SimpleQueryPassWordChar: sets PassWordChar of the single line query editor.
20- - Property QueryResult holds the text of the Edit when the dialog closes.
21-
22-#### New events
23-
24-The following (most of them Delphi compatible) events were implemented:
25-
26-- OnDialogConstructed
27-- OnDialogCreated
28-- OnDialogDestroyed
29-- OnVerificationClicked. This also updates the Flags property to reflect the current state of the verification checkbox.
30-- OnExpanded. The associated new property Expanded only has meaning in the context of this event.
31-- OnTimer
32-- OnRadioButtonClicked
33-- OnHyperlinkClicked (Windows Vista+ native dialog only). The associated new property URL only has meaning in the context of this event.
34-- OnNavigated (Windows Vista+ native dialog only). This event only fires if the dialog has pages (see: [MS docs](https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.taskdialogpage.navigate?view=windowsdesktop-7.0)). Pages are not implemented in TTaskDialog, but they might be implemented in a derived class. The event handler must however be in the base class for Delphi compatibility.
35-- OnHelp. Does not exist in Delphi (even though Delphi does have a protected method DoOnHelp). Triggers when user presses F1 when the dialog is open.
36-
37-#### New properties
38-
39-- CollapseButtonCaption: controls the caption of the Expand/Collapse button when the dialog is in expanded state.
40-- CustomMainIcon and CustomFooterIcon: icons to be displayed in the dialog (instead of the standard icons) when the flags tfUseHIconMain and tfUseHIconFooter are used.
41-- ProgressBar: the progressbar on the dialog. You can set it's properties Position, Min, Max, MarqueeSpeed (native Vista+ only) and State (native Vista+ only). When the dialog is shown, you can send messages (e.g. in OnDialogXXX events) to alter these properties.
42-
43-#### Support for messages
44-
45-- Support for sending messages (via SendMessage) to the dialog has been added to the emulated dialog. This allows a.o. to enable/disable (radio)buttons, click (radio)buttons and update captions (Title, Text, FooterText and ExpandedText)
46-
47-### TCalendarDialog
48-
49-- Added `FirstDayOfWeek` as a new publishced property since it has been present in `TCalendar` but could not be accessed easily.
50-
51-### TShape
52-
53-- New public method `function PtInShape(const P: TPoint): Boolean` to determine whether the specified point P lies within the shape boundaries.
54-- New event `OnShapeClick` firing when a click on the control occurs within the shape boundaries
55-- The control can be selected in the form designer only by clicking somewhere within the shape. Clicking on controls covered by the TShape can still be selected when the click is outside the shape boundary.
56-- New event `OnShapePoints`, together with the new `TShapeType` element `tsPolygon`, gives the user the opportunity to define an arbitrary polygon for the component.
57-
58-### TLabeledEdit
59-
60-- The published `EditLabel.Layout` property could not be changed due to anchoring. The anchor was removed, and `EditLabel.Layout` now can be adjusted when the label is at the left or right side of the edit.
61-- New property `EditLabel.Alignment` to adjust horizontal position of the label when it is above or below the edit.
62-
63-### TTimeEdit
64-
65-- New properties `TimeFormat` and `TimeSeparator` for more flexible formatting of the time output.
66-
67-### TFilenameEdit
68-
69-- Old behaviour: InitialDir was unchanged after user executed the dialog.
70-- New behaviour: if the dialog is executed, InitialDir is set to the directory of the dialog (even if the dialog is cancelled).
71-- Reason: consistency with the behaviour of TOpenDialog.
72-- Commit: 4c4c9631
73-
74-### Control.ChildSizing
75-
76-- Added crsSameSize for sizing all columns/row to have each an equal share of the available space.
77-
78-## IDE Changes
79-
80-### Compiler Options
81-
82-- Added project compiler option for [[FPC Subtarget Support|SubTarget]].
83-- Added IDE macro [[IDE Macros in paths and filenames|$(FPCTarget)]], a short form of *\$(TargetCPU)-\$(TargetOS)-\$(SubTarget)*.
84-- Added compiler option **Write config instead of command line parameters (@)**. [[IDE Window: Compiler Options|See here]]. Useful for passing large amount of paths to the compiler or an easier way to use the Lazarus options in your build scripts.
85-- Added predefined variable **Laz_FullVersion** to conditionals. [[Macros and Conditionals|See here]]. Useful to define Lazarus version dependent command line parameters.
86-- Wildcards * and ** in search paths. [[IDE Window: Project Options|See here]].
87-
88-### Editor
89-
90-- Added elastic tabs
91-- Pas-Highlighter: added color for Proc/Var modifiers
92-- Gutter
93- - Configurable padding between parts for improved readability
94- - Configurable Width (e.g. space for more marks breakpoint, bookmark and error/warning)
95- - Highlight of current line in gutter
96- - Highlight of inner-most fold section in fold-tree gutter
97-- Syncro-Edit
98- - Added key-combos for matching words case-sensitive or insensitive. Added key-combos for matching words according to their "context" (e.g. don't group code with strings or comments)
99- - Added ability to add custom cells from selection
100- - Added ability to resize cells
101-
102-### Debugger
103-
104-- Alt + Left-Mouse Gutter click / Ctrl-Alt-F5: Add breakpoint (if not yet set) and ,pen properties of breakpoint.
105-- Color config for assembler window
106-- Breakpoint window can group breakpoints by "group". Change group by drag and drop
107-- Run Param (Windows only): Allow to specify the default pos/size for console/gui window. <https://wiki.freepascal.org/IDE_Window:_Run_parameters#Default_Window.2FConsole_position_and_size>
108-- Run Param: Redirect StdIn/Out/Err (FpDebug and "Run without debug" on Linux/Windows)
109-- "Debug visualizers" / Value-Formatter <https://wiki.freepascal.org/IDE_Window:_IDE_Optiorns_-_Debugger_Value-Formatter>
110- - TDateTime
111- - TColor / TAlphaColor
112- - Currency
113- - Ordinal to named constant
114-- New "DisplayFormats" for watches
115- - Values in arrays and structures are now following the DisplayFormat
116- - Global (and Project) Defaults for Watch-DisplayFormats. (Including global settings for Hints, and Locals)
117-
118-### Sample EditMask files in property editor for TMaskEdit.EditMask
119-
120-- If you load a sample EditMask file in the property editor, the IDE now reloads this file when you invoke the property editor again
121-- You can unload a sample file if you don't want to have it loaded anymore.
122-- The property editor supports Delphi sample files (*.dem) as well as Lazarus sample files (*.lem), the latter having a more relaxed syntax.
123-- Lines in a sample file which do not properly represent a sample editmask are ignored.
124-- For the time being, Lazarus does **not** distribute sample editmask files, mostly because of possible copyright issues.
125-
126-### Code Templates
127-
128-These are the templates you get by a shortcut `Ctrl`+`J` in the editor.
129-
130-- File containing default templates `lazarus_dci_file.dci` was renamed to `codetemplates.dci`. This is an internal lazarus file and does not affect custom templates, which are still located in the configuration folder.
131-- The class `TSynAutoComplete` (actually `TCustomSynAutoComplete`) interface was changed to support ordering the list of templates properly. This class is probably used only for the `Ctrl`+`J` templates and not for any user code. If it is used somewhere, then the code must be adjusted.
132-
133-### Pas2js
134-
135-- The Pas2jsDsgn package now adds a new menu item under **Tools / Install/Update pas2js**, which allows to download the latest release, unpacks it and sets the paths for pas2js and the simple web server. So with a few mouse clicks Lazarus is ready for web development.
136-
137-## IDE Interface Changes
138-
139-## Components
140-
141-### TAChart
142-
143-- **TBubbleSeries**: New `BubbleSizeUnits` options `bruPercentageRadius` and `bruPercentageArea` - the bubble size values are interpreted as bubble radius or bubble area. The bubble radius then is drawn as a percentage of the plot area size where the largest bubble corresponds to `BubbleRadiusPercentage`.
144-- **TChartSeries**: New event **OnGetMarkText**, similar to **OnGetMark**, but with additional parameters (series, y index and x index of the data point) for specifying individual data point labels in multi-values series. **OnGetMark** has been deprecated and will be removed when v5.0 is released
145-- **TLineSeries**: New `LineType`s `ltStepCenterXY` and `ltStepCenterYX`, available in LibreOffice Calc.
146-- **TPieSeries**, **TBubbleSeries,**TBarSeries**allow controlling all brush and pen parameters of individual data points by means of the**Styles''' property.
147-- Chart sources can provide **multi-level data-point labels** separated by the **LabelSeparator**.
148-- **Chart.AxisPosition** now can be given in axis units (**cuAxis**). For performing the correct axis transformation, the index of the orthogonal axis containing the `Position` value must be specified, **OrthogonalAxisIndex**.
149-- **Chart styles** were extended to support individual series pointers per y level.
150-
151-## Changes affecting compatibility
152-
153-### LCL incompatibility
154-
155-#### TTaskDialog
156-
157-- The implementation of TTaskDialog has been refactored.
158- - Widgetset specific implementation has been moved to the widgetset.
159- - The emulated taskdialog has been moved to a new unit: TaskDlgEmulation.
160- - The unit LCLTaskDialog has been deprecated.
161- - Remedy: if you use TTaskDialog from (now deprecated) unit LCLTaskDialog, use TTaskDialog from Dialogs unit instead.
162-- Execute() now passes the handle of the active form instead of 0.
163- - Reason: it makes Execute() honour the tfRelativeToWindow flag.
164- - Remedy: if your code relied on passing 0 as the ParentWind parameter use Execute(0) instead.
165-- The occurrence of '\n' in e.g. captions is no longer converted to a LineFeed.
166- - Reasons:
167- - Wrong results if the capion of a (radio)button is set to e.g. 'Save in "c:\new_folder\new.work"'
168- - You can have a LineFeed (#10) inside a Pascal string.
169- - See also [Issue \#38676](https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/38676).
170- - Remedy: use LineFeed character in captions where applicable.
171-
172-#### TShellTreeView, TShellListView
173-
174-- The `ReadOnly` property of these controls has been changed to be `true` by default.
175- - Reason: These controls, by default, do not propagate changes of their item/node captions to the file system. The old behaviour was confusing because the user was able to rename an item/node but had to notice that the change was not persistent without additional code.
176- - Remedy: Applications using the shell controls only for selecting files and folders are not affected. In "file-manager" application types, however, the `ReadOnly` property must be changed explicitely to `false` so that the user can edit items/nodes again.
177-
178-#### TFilenameEdit.InitialDir
179-
180-- Previous behaviour: InitialDir was not updated after the dialog was executed.
181-- New behaviour: InitialDir will be updated after the dialog was executed. This also happens if the user cancels the dialog.
182-- Reason: consistency with the behaviour of TOpenDialog.
183-- Remedy: include ofNoChangeDir in DialogOptions
184-- Commit: 4c4c9631
185-
186-### Components incompatibility
187-
188-#### LazUtils
189-
190-- Function **IsNumber** was poorly named because it suggests to check the provided string for being a valid number, but only checks for numeric characters omitting e.g. negative and hex or binary values. Renamed too **IsNumeric** and deprecated the old function (to be removed in v4.99).
191-
192-#### TAChart
3+Free Pascal Compiler - User Changes (Release Notes)
1934
194-- Utility functions **PointDist** and **PointLineDist** have been marked as being **deprecated** and replaced by **PointDistSq** and **PointLineDistSq** since they return the square of the distance rather than the distance itself.
5+User Changes:
1956
196-#### SynEdit (in user apps)
7+[[User Changes 2.2.0|2.2.0]] | [[User Changes 2.2.2|2.2.2]] | [[User Changes 2.2.4|2.2.4]] | [[User Changes 2.4.0|2.4.0]] | [[User Changes 2.4.2|2.4.2]] | [[User Changes 2.4.4|2.4.4]] | [[User Changes 2.6.0|2.6.0]] | [[User Changes 2.6.2|2.6.2]] | [[User Changes 2.6.4|2.6.4]] | [[User Changes 3.0|3.0]] | [[User Changes 3.0.2|3.0.2]] | [[User Changes 3.0.4|3.0.4]] | [[User Changes 3.2.0|3.2.0]] | [[User Changes 3.2.2|3.2.2]] | [[User Changes Trunk|trunk (current development)]]
1978
198-- The default Keystrokes for indent/unindent changed from **Shift-Ctrl I/U** to **Ctrl I/U**\
199- This affects only TSynEdit newly added to forms. Existing TSynEdit will load the old keystrokes. Action is only needed if TSynEdits are added to apps with other existing TSynEdit, and should be in sync. <https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/40810>
9+New Features:
20010
201-## Other release notes
11+[[FPC New Features 2.4.2|2.4.2]] | [[FPC New Features 2.4.4|2.4.4]] | [[FPC New Features 2.6.0|2.6.0]] | [[FPC New Features 2.6.2|2.6.2]] | [[FPC New Features 3.0.0|3.0.0]] | [[FPC New Features 3.2.0|3.2.0]] | [[FPC New Features 3.2.2|3.2.2]] | [[FPC New Features Trunk|trunk (current development)]]
20212
20313---
204-*From the Free Pascal wiki, page "Lazarus 4.0 release notes", as it stood on 2024-05-01 after a change by Wp, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
205-Category: Lazarus
206-Category: Release Notes
14+*From the Free Pascal wiki, page "Lazarus 4.0 release notes", as the Internet Archive kept it on 2025-05-12, last changed on 2025-05-06. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history