Sign in Join
Wiki copytemporary

Lazarus 4.0 release notes: what changed

Revision 1 to 2. 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
33## LCL Interfaces Changes
44
55## LCL Changes
66
77### TTaskDialog
88
99#### Support for Queries
1010
1111- 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.
1212 - New flag tfQuery: adds a query (in the form of a combobox) to the dialog.
1313 - New property QueryChoices (TStrings): sets the predefined answers.
1414 - New property QueryItemIndex: sets the ItemIndex of the combobox and holds said ItemIndex when the dialog is closed.
1515 - New flag tfQueryFixedChoices: control whether or not the user can add his/hers own text to the combobox.
1616 - New property QueryResult: holds the text of the choice made when the dialog closes.
1717 - New flag tfSimpleQuery: adds a single line Edit to the dialog. Note: this flag is mutually exclusive with the tfQuery flag.
1818 - New property SimpleQuery: sets the initial text of the Edit.
1919 - New property SimpleQueryPassWordChar: sets PassWordChar of the single line query editor.
2020 - Property QueryResult holds the text of the Edit when the dialog closes.
2121
2222#### New events
2323
2424The following (most of them Delphi compatible) events were implemented:
2525
2626- OnDialogConstructed
2727- OnDialogCreated
2828- OnDialogDestroyed
2929- OnVerificationClicked. This also updates the Flags property to reflect the current state of the verification checkbox.
3030- OnExpanded. The associated new property Expanded only has meaning in the context of this event.
3131- OnTimer
3232- OnRadioButtonClicked
3333- OnHyperlinkClicked (Windows Vista+ native dialog only). The associated new property URL only has meaning in the context of this event.
3434- 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.
3535- 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.
3636
3737#### New properties
3838
3939- CollapseButtonCaption: controls the caption of the Expand/Collapse button when the dialog is in expanded state.
4040- CustomMainIcon and CustomFooterIcon: icons to be displayed in the dialog (instead of the standard icons) when the flags tfUseHIconMain and tfUseHIconFooter are used.
4141- 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.
4242
4343#### Support for messages
4444
4545- 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)
4646
4747### TCalendarDialog
4848
4949- Added `FirstDayOfWeek` as a new publishced property since it has been present in `TCalendar` but could not be accessed easily.
5050
5151### TShape
5252
5353- New public method `function PtInShape(const P: TPoint): Boolean` to determine whether the specified point P lies within the shape boundaries.
5454- New event `OnShapeClick` firing when a click on the control occurs within the shape boundaries
5555- 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.
5656- New event `OnShapePoints`, together with the new `TShapeType` element `tsPolygon`, gives the user the opportunity to define an arbitrary polygon for the component.
5757
5858### TLabeledEdit
5959
6060- 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.
6161- New property `EditLabel.Alignment` to adjust horizontal position of the label when it is above or below the edit.
6262
6363### TTimeEdit
6464
6565- New properties `TimeFormat` and `TimeSeparator` for more flexible formatting of the time output.
6666
6767### TFilenameEdit
6868
6969- Old behaviour: InitialDir was unchanged after user executed the dialog.
7070- New behaviour: if the dialog is executed, InitialDir is set to the directory of the dialog (even if the dialog is cancelled).
7171- Reason: consistency with the behaviour of TOpenDialog.
7272- Commit: 4c4c9631
7373
7474### Control.ChildSizing
7575
7676- Added crsSameSize for sizing all columns/row to have each an equal share of the available space.
7777
7878## IDE Changes
7979
8080### Compiler Options
8181
8282- Added project compiler option for [[FPC Subtarget Support|SubTarget]].
8383- Added IDE macro [[IDE Macros in paths and filenames|$(FPCTarget)]], a short form of *\$(TargetCPU)-\$(TargetOS)-\$(SubTarget)*.
8484- 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.
8585- Added predefined variable **Laz_FullVersion** to conditionals. [[Macros and Conditionals|See here]]. Useful to define Lazarus version dependent command line parameters.
8686- Wildcards * and ** in search paths. [[IDE Window: Project Options|See here]].
8787
8888### Editor
8989
9090- Added elastic tabs
9191- Pas-Highlighter: added color for Proc/Var modifiers
9292- Gutter
9393 - Configurable padding between parts for improved readability
9494 - Configurable Width (e.g. space for more marks breakpoint, bookmark and error/warning)
9595 - Highlight of current line in gutter
9696 - Highlight of inner-most fold section in fold-tree gutter
9797- Syncro-Edit
9898 - 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)
9999 - Added ability to add custom cells from selection
100100 - Added ability to resize cells
101101
102102### Debugger
103103
104104- Alt + Left-Mouse Gutter click / Ctrl-Alt-F5: Add breakpoint (if not yet set) and ,pen properties of breakpoint.
105105- Color config for assembler window
106106- Breakpoint window can group breakpoints by "group". Change group by drag and drop
107107- 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>
108108- Run Param: Redirect StdIn/Out/Err (FpDebug and "Run without debug" on Linux/Windows)
109109- "Debug visualizers" / Value-Formatter <https://wiki.freepascal.org/IDE_Window:_IDE_Optiorns_-_Debugger_Value-Formatter>
110110 - TDateTime
111111 - TColor / TAlphaColor
112112 - Currency
113113 - Ordinal to named constant
114114- New "DisplayFormats" for watches
115115 - Values in arrays and structures are now following the DisplayFormat
116116 - Global (and Project) Defaults for Watch-DisplayFormats. (Including global settings for Hints, and Locals)
117117
118118### Sample EditMask files in property editor for TMaskEdit.EditMask
119119
120120- If you load a sample EditMask file in the property editor, the IDE now reloads this file when you invoke the property editor again
121121- You can unload a sample file if you don't want to have it loaded anymore.
122122- The property editor supports Delphi sample files (*.dem) as well as Lazarus sample files (*.lem), the latter having a more relaxed syntax.
123123- Lines in a sample file which do not properly represent a sample editmask are ignored.
124124- For the time being, Lazarus does **not** distribute sample editmask files, mostly because of possible copyright issues.
125125
126126### Code Templates
127127
128-These are the templates you get by a shortcut <span class="kbd">Ctrl</span>+<span class="kbd">J</span> in the editor.
128+These are the templates you get by a shortcut `Ctrl`+`J` in the editor.
129129
130130- 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 <span class="kbd">Ctrl</span>+<span class="kbd">J</span> templates and not for any user code. If it is used somewhere, then the code must be adjusted.
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.
132132
133133### Pas2js
134134
135135- 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.
136136
137137## IDE Interface Changes
138138
139139## Components
140140
141141### TAChart
142142
143143- **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`.
144144- **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
145145- **TLineSeries**: New `LineType`s `ltStepCenterXY` and `ltStepCenterYX`, available in LibreOffice Calc.
146146- **TPieSeries**, **TBubbleSeries,**TBarSeries**allow controlling all brush and pen parameters of individual data points by means of the**Styles''' property.
147147- Chart sources can provide **multi-level data-point labels** separated by the **LabelSeparator**.
148148- **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**.
149149- **Chart styles** were extended to support individual series pointers per y level.
150150
151151## Changes affecting compatibility
152152
153153### LCL incompatibility
154154
155155#### TTaskDialog
156156
157157- The implementation of TTaskDialog has been refactored.
158158 - Widgetset specific implementation has been moved to the widgetset.
159159 - The emulated taskdialog has been moved to a new unit: TaskDlgEmulation.
160160 - The unit LCLTaskDialog has been deprecated.
161161 - Remedy: if you use TTaskDialog from (now deprecated) unit LCLTaskDialog, use TTaskDialog from Dialogs unit instead.
162162- Execute() now passes the handle of the active form instead of 0.
163163 - Reason: it makes Execute() honour the tfRelativeToWindow flag.
164164 - Remedy: if your code relied on passing 0 as the ParentWind parameter use Execute(0) instead.
165165- The occurrence of '\n' in e.g. captions is no longer converted to a LineFeed.
166166 - Reasons:
167167 - Wrong results if the capion of a (radio)button is set to e.g. 'Save in "c:\new_folder\new.work"'
168168 - You can have a LineFeed (#10) inside a Pascal string.
169169 - See also [Issue \#38676](https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/38676).
170170 - Remedy: use LineFeed character in captions where applicable.
171171
172172#### TShellTreeView, TShellListView
173173
174174- The `ReadOnly` property of these controls has been changed to be `true` by default.
175175 - 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.
176176 - 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.
177177
178178#### TFilenameEdit.InitialDir
179179
180180- Previous behaviour: InitialDir was not updated after the dialog was executed.
181181- New behaviour: InitialDir will be updated after the dialog was executed. This also happens if the user cancels the dialog.
182182- Reason: consistency with the behaviour of TOpenDialog.
183183- Remedy: include ofNoChangeDir in DialogOptions
184184- Commit: 4c4c9631
185185
186186### Components incompatibility
187187
188188#### LazUtils
189189
190190- 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).
191191
192192#### TAChart
193193
194194- 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.
195195
196196#### SynEdit (in user apps)
197197
198198- The default Keystrokes for indent/unindent changed from **Shift-Ctrl I/U** to **Ctrl I/U**\
199199 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>
200200
201201## Other release notes
202202
203203---
204204*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).*
205205Category: Lazarus
206206Category: Release Notes

Back to history