Sign in Join
Wiki copytemporary

Lazarus 1.8.0 release notes: what changed

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

OldNewLine
11Statistics:
22
331. commits: 3980
442. log: svn log -r 50542:56591 (https://svn.freepascal.org/svn/lazarus/branches/fixes_1_8)
55
66Fixes branch: [[Lazarus 1.8 fixes branch]]
77
88# LCL Interfaces Changes
99
1010- [[Qt5 Interface|Qt5]]: new widgetset based on Qt5 libraries.
1111
1212# LCL Changes
1313
1414- [[TApplication]]
1515 - Scaled property: the LCL is DPI-aware. Please see [[High DPI]] for more information.
1616
1717- [[TCustomForm]]
1818 - new position poWorkAreaCenter - center form on working area (depends on DefaultMonitor)
1919 - new compiler define LCLRealFormBounds. If you compile your application with LCLRealFormBounds on, the TCustomForm bounds (Width/Height) will be real outer bounds and not client bounds. Also constraints will affect real bounds. For now, it is supported only by win32.
2020 - Scaled property: the LCL is DPI-aware. Please see [[High DPI]] for more information.
2121
2222- TImage
2323 - new event OnPaintBackground.
2424 - new properties StretchInEnabled, StretchOutEnabled.
2525 - new properties KeepOriginXWhenClipped, KeepOriginYWhenClipped.
2626
2727- TTreeView
2828 - implemented Tooltips property.
2929 - implemented MultiSelectStyle property.
3030
3131- [[TToolButton]]
3232 - new style tbsButtonDrop - paints a drop down arrow on the right side of the button. In contrast to tbsDropDown the button has only single clicking area that invokes the DropDownMenu if assigned.
3333 - new event OnArrowClick. It is called if Style=tbsDropDown when the user clicks the arrow button area of toolbutton. Breaking change: In 1.6. the OnClick event was called for this!
3434
3535- [[TToolBar]]
3636 - new DropDownWidth property to setup the width of the toolbutton arrow area for Style=tbsDropDown.
3737
3838- ClipBoard
3939 - The ClipBoard now supports copying and pasting text in HTML format by means of the methods GetAsHtml and SetAsHtml.
4040
4141- Menus ([[TPopupMenu]], [[TMainMenu]], [[TMenuItem]])
4242 - Menus now support OwnerDraw with (almost) Delphi's approach. If you set TMenu.OwnerDraw to true the OnMeasureItem and OnDrawItem from TMenu and TMenuItem will be called. OnDrawItem from Lazarus has the same parameters as OnAdvancedDrawItem from Delphi. You can use the events also from TMenu, which is an LCL addition to Delphi. For now only win32 is supported.
4343
4444- Dialogs
4545 - [[TTaskDialog]] added
4646
4747- [[TDateTimePicker]]
4848 - new [[DateTimeCtrls Package|TDateTimePicker.Options]] property
4949
5050# IDE Changes
5151
5252- [[lazbuild]]
5353 - new option --add-package-link to register given lpk files without building.
5454
5555- [[Lazarus IDE Tools|Quick Fixes]]
5656 - new QuickFix for any fpc hint, note or warning: add compiler directive {\$warn id off}
5757
5858- [[Lazarus IDE Tools|Code creation]]
59- - new shortcut <span class="kbd">Ctrl</span>+<span class="kbd">Shift</span>+<span class="kbd">X</span> that shows a CodeCreation dialog with more options. <span class="kbd">Ctrl</span>+<span class="kbd">Shift</span>+<span class="kbd">C</span> never shows a dialog now.
59+ - new shortcut `Ctrl`+`Shift`+`X` that shows a CodeCreation dialog with more options. `Ctrl`+`Shift`+`C` never shows a dialog now.
6060 - You can choose the default visibility of the methods in Tools / Options / Codetools / Class Completion / Default section of methods.
6161
6262- Word+Identifier completion: If the option Codetools / Identifier Completion / Replace whole words is enabled, pressing Return replaces the whole word at cursor, pressing Shift+Return replaces only the left side. If the option is disabled it works the other way round: Return replaces left side, Shift+Return replaces whole word.
6363
6464- "case ofall" code template indentation change
6565 - Old behavior: the created case-list was always flat
6666 - New behavior: by default it is now indented according to source editor options.
6767 - Reason: the indented case-list is Delphi-standard
6868 - Remedy: edit the ofall template and use the WithoutExtraIndent parameter: "\$OfAll(WithoutExtraIndent)"
6969
7070- Ctrl-Enter alias "Open file at cursor" was improved when cursor in a Pascal file: It now recognizes properly \$I and \$R directives, uses nodes, string literals and comments.
7171
7272- DPI awareness: the IDE is DPI-aware (it's ongoing work, so expect issues). Please see [[High DPI]] for more information.
7373
7474- pas2js support:
7575 - parsing the external class declaration of pas2js, code completion, find declaration, etc.
7676 - namespaces: The IDE supports the -NS option and project default name spaces of Delphi/pas2js. As soon as FPC supports namespaces Lazarus supports it too.
7777
7878- Editor
7979 - New [[Lazarus IDE Tools|colored outline of source structure]]. (like cnpack, if then block outline)
8080
8181- Support for Win98/WinNT has been dropped.
8282
8383# IDE Interfaces Changes
8484
8585- New function LazarusIDE.FindUnitsOfOwner listing all units of a project/package. [1](http://wiki.lazarus.freepascal.org/Extending_the_IDE#All_units_of_current_project)
8686
8787# Components
8888
8989## LazControls
9090
9191- Added [[TSpinEditEx]] and [[TFloatSpinEditEx]] a widgetset independant implementation of [[TSpinEdit]] resp. [[TFloatSpinEdit]] with some extended capabilities:
9292 - NullValue property.
9393 - Configurable behaviour when the text inside the control is not a number.
9494
9595## ToDoListLaz
9696
9797- Now searches all used units of projects. Excluding used packages, including all units listed in the project inspector.
9898
9999## [[TAChart]]
100100
101101- New component [[TAChart documentation|TChartCombobox]]
102102- Improved data point tools (property Target)
103103- New demos (runtime demos, datapointtools)
104104
105105## EditorToolbar
106106
107107- The package editortoolbar.lpk is removed and its functionality is integrated in IDE.
108108 - The settings can be found in Tools -\> Options -\> Environment -\> Editor Toolbar
109109
110110# Changes affecting compatibility
111111
112112## LazUtils
113113
114114### Wrappers for string functions are disabled
115115
116116Various units in LCL, LazUtils and Codetools have wrappers for string functions in LazUTF8 and LazFileUtils. They are now disabled. They can still be enabled by defining "EnableWrapperFunctions".
117117
118118The wrapper functions were already deprecated in Lazarus 1.6 with a proper hint about where to find the actual function. This allowed a transition period for everybody who updates to every major Lazarus version.
119119
120120### FindDefaultExecutablePath searches on Windows in BaseDir
121121
122122- Applies: Non Unix systems.
123123- Old behavior: BaseDir was only searched if '.' was in %PATH% - same as Unix shells.
124124- New behavior: BaseDir is always searched (if set) on non Unix.
125125- Reason: Windows console searches in current directory so Windows users expect to find executable in base directory.
126126- Remedy: Use instead SearchFileInPath(Executable,BaseDir,GetEnvironmentVariableUTF8('PATH'),PathSeparator,\[sffDontSearchInBasePath\]);
127127
128128## LCL incompatibilities
129129
130130### 1.8.4: TToolBar children ignore Align
131131
132132Controls placed within TToolBar cannot be aligned with the Align property.
133133
134134- Old behavior: The Align property of TToolBar children was taken into account.
135135- New behavior: The Align property is ignored.
136136- Reason: It caused endless alignment loops when the control's size was changed by code in Create.
137137- Remedy: use a parent container for TToolBar and align the controls within this container.
138138
139139### TLCLPlatform definition was moved
140140
141141TLCLPlatform was moved from InterfaceBase to a new LCLPlatformDef unit in r53711. Also a related LCLPlatformDisplayNames was moved from LazConf to the same unit.
142142
143143- Old behavior: Unit InterfaceBase was used for TLCLPlatform type.
144144- New behavior: Unit LCLPlatformDef must be used for it. InterfaceBase may still be needed for other types.
145145- Reason: The GUI independent parts of LCL definitions will be needed for command line programs (LazBuild).
146146- Remedy: use the right units in your uses-sections.
147147
148148### TToolButton.OnArrowClick added
149149
150150- Applies: event called if Style=tbsDropDown when the user clicks the arrow button area of toolbutton.
151151- Old behavior: OnClick was called.
152152- New behavior: OnArrowClick is called.
153153- Reason: there was no easy way to detect click on the arrow sub-button.
154154- Remedy: use the same event handler for OnArrowClick and OnClick.
155155
156156### TCustomAbstractGroupedEdit descendants must override GetRealText/SetRealText methods
157157
158158- Old behavior: TCustomAbstractGroupedEdit reintroduced the Text property
159159- New behavior: TCustomAbstractGroupedEdit uses TControl.Text
160160- Reason: unnecessary 2 different properties with the same name and function
161161- Remedy: override GetRealText/SetRealText instead of GetText/SetText.
162162
163163### TFontStyle enum item order is changed to match with Delphi
164164
165165- Old behavior: the last item was fsUnderline
166166- New behavior: the last item is fsStrikeOut
167167- Reason: Delphi compatibility.
168168- Remedy: check code if it depends on Ord(TFontStyle) - like "StyleStrings: Array\[TFontStyle\] of string = ('Bold', 'Italic','StrikeOut','Underline');" or saving/retrieving font style as ordinal value.
169169- More info: It does not affect LFM streaming. It can make a difference when iterating items.
170170
171171### THintWindow transparent for mouse messages by default
172172
173173- Old behavior: [[THintWindow]] received mouse messages
174174- New behavior: [[THintWindow]] passes mouse message through itself to the underlying form/control.
175175- Reason: Delphi compatibility.
176176- Remedy: to make [[THintWindow]] clickable again, add a LM_NCHITTEST message handler to your hint window descendant and return HTCLIENT as message result:
177177
178178``` pascal
179179 procedure WMNCHitTest(var Message: TLMessage); message LM_NCHITTEST;
180180 // ...
181181 procedure TMyHintWindow.WMNCHitTest(var Message: TLMessage);
182182 begin
183183 Message.Result := HTCLIENT;
184184 end;
185185```
186186
187187### TCustomTabControl setting TabIndex or PageIndex by code
188188
189189- Old behavior: setting TabIndex or PageIndex by code caused an OnChange event to be fired
190190- New behavior: setting TabIndex or PageIndex by code no longer causes an OnChange to be fired
191191- Reason: Delphi compatibility.
192192- Remedy: set nboDoChangeOnSetIndex in Options (this option is not available in Delphi), call OnChange in you own code when changing TabIndex/PageIndex, or move the code in OnChange to another event if applicable.
193193
194194### TCustomControlFilterEdit.UseFormActivate deprecated
195195
196196- Old behavior: setting UseFormActivate to true, the filter edit got focus on Form.Activate
197197- New behavior: UseFormActivate does nothing and will be removed after 1.8
198198- Reason: it globally misused the TForm.OnActivate event.
199199- Remedy: set ActiveControl in Form.DoCreate or use correct TabOrder or similar.
200200
201201### DPI value change for all Mac OSX widget sets
202202
203203- Old behavior: all DPI/PPI properties had value of 72 on all Mac OSX widget sets.
204204- New behavior: Screen.PixelsPerInch and TMonitor.PixelsPerInch change values from 72 to 96 on Mac. The value of GetDeviceCaps(MyDC, LOGPIXELSX) still returns 72.
205205- Reason: 100% scaling on Windows and Linux system is 96 DPI. If Mac uses 72 DPI for 100% the following points are a problem:
206206 - the Font.Height / Font.Size ratio is different from Win/Linux. (Setting Font.Size := 10 results in different font height on Mac and Win/Linux.)
207207 - automatic LCL High-DPI methods scale controls down on Mac.
208208- Remedy: If you develop applications for the Mac, check your code for any "Font.Size := ValueGreaterThanZero" assignments. You have to adjust them in ratio 72/96 to receive the same font height as for LCL 1.6. E.g. "Font.Size := 12" has to be changed to "Font.Size := 9". Font.Height assignments don't need to be adjusted.
209209
210210### TDateTimePicker.OnCheckBoxChange Sender parameter change
211211
212212- Old behavior: Sender was the TCheckBox object within TDateTimePicker
213213- New behavior: Sender is the TDateTimePicker object
214214- Reason: Do not expose private field TCheckBox to public methods.
215215- Remedy: If you need the TCheckBox object in OnCheckBoxChange handler, you can get it from the Controls array property.
216216
217217### PCheckComboItemState not found
218218
219219- Old behavior: TCustomCheckCombo Items.Objects\[\] were PCheckComboItemState
220220- New behavior: TCustomCheckCombo Items.Objects\[\] are now TCheckComboItemState
221221- Reason: when Items.Objects\[\] was accidentally overwritten or an item was added wrong, there was a crash, even possible X freeze. Now it checks for such a mistake and creates a normal exception.
222222- Remedy: Use TCustomCheckCombo instead.
223223
224224## Components incompatibilities
225225
226226### easylazfreetype: TCustomFreeTypeFontCollection.AddFile
227227
228228- Old behavior: return Boolean
229229- New behavior: return TCustomFontCollectionItem
230230- Reason: there was no easy possiblity to work with the added item.
231231- Remedy: don't check the result for True, but for "\<\>nil".
232232
233233## IDE incompatibilities
234234
235235### Form resource strings table LRT format support is dropped, LRJ format introduced instead
236236
237237- Old behavior: Form resource strings were extracted into LRT file when saving form.
238238- New behavior: Form resource strings are extracted into LRJ file with format unified with RSJ files which are emitted by FPC 3.0.0 and up. LRT support is dropped.
239239- Reason: LRT file format was broken by design, e.g. it didn't handle multiline captions properly (see bug 26553 for details).
240240- Remedy: Open your project and click "Project" -\> "Resave forms with enabled i18n" menu item, then rebuild your project. After this you can safely remove LRT files.
241241
242242## DateTimeCtrls
243243
244244### DateTimeCtrls split into DateTimeCtrls and DateTimeCtrlsDsgn packages
245245
246246- Old: one run/design time package DateTimeCtrls
247247- New: runtime package=DateTimeCtrls, designtime package=DateTimeCtrlsDsgn
248248- Reason: Consistency, separate run and design time code
249249- Remedy: DateTimeCtrls components get unregistered. You have to install DateTimeCtrlsDsgn into the IDE.
250250- Info: Don't link DateTimeCtrlsDsgn into your application.
251251
252252## LazControls
253253
254254### Register procedures moved into LazControlDsgn package
255255
256256- Old: register procedures were in the LazControls package although there was a LazControlDsgn package
257257- New: moved register procedures into LazControlDsgn package
258258- Reason: Consistency, separate run and design time code
259259- Remedy: the components get unregistered. You have to install LazControlDsgn into the IDE.
260260- Info: LazControlDsgn is a [[Lazarus Packages|designtime]] package.
261261
262262# Previous release notes
263263
264264- [[Lazarus 1.6.0 release notes]]
265265- [[Lazarus 1.4.0 release notes]]
266266- [[Lazarus 1.2.0 release notes]]
267267- [[Lazarus 1.0 release notes]]
268268
269269---
270270*From the Free Pascal wiki, page "Lazarus 1.8.0 release notes", as it stood on 2020-08-22 after a change by Trev, 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).*
271271Category: Lazarus
272272Category: Release Notes

Back to history