Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
General
»
design
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
IRC channel
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Can function be used for ...
by
Joanna
[
Today
at 12:48:19 pm]
Parameter passing odditie...
by
Nitorami
[
Today
at 12:42:09 pm]
Ho Ho Ho IntraWeb in Laza...
by
Thaddy
[
Today
at 12:32:01 pm]
Access violation when ope...
by
Чебурашка
[
Today
at 12:14:30 pm]
Lazarus features in a non...
by
jollytall
[
Today
at 11:53:17 am]
Access violation when re-...
by
Chris Osborne
[
Today
at 11:43:49 am]
FpDebug questions
by
Martin_fr
[
Today
at 11:25:02 am]
splitting an image
by
Dzandaa
[
Today
at 11:15:40 am]
how to tweek fpmake to co...
by
marcov
[
Today
at 10:35:11 am]
Why isn't TTIRadioGroup's...
by
egsuh
[
Today
at 08:09:35 am]
Lazarus for Windows on aa...
by
Wallaby
[April 23, 2024, 11:46:56 pm]
(Solved) TIndexedAVLTree ...
by
lainz
[April 23, 2024, 10:49:03 pm]
Demo Scene Picture sinwav...
by
KodeZwerg
[April 23, 2024, 10:26:21 pm]
fkInternalCalc
by
zraja
[April 23, 2024, 09:31:07 pm]
A fairly simple sound sol...
by
KodeZwerg
[April 23, 2024, 09:23:37 pm]
add new targets to make
by
marcov
[April 23, 2024, 08:38:42 pm]
Quirky windows
by
ASerge
[April 23, 2024, 07:07:16 pm]
[Request] Demo Scene Sub ...
by
Gigatron
[April 23, 2024, 06:29:39 pm]
Unlocking Files
by
KodeZwerg
[April 23, 2024, 06:03:08 pm]
[SOLVED] trunk bug for mi...
by
Key-Real
[April 23, 2024, 05:56:32 pm]
Demo Scene Bitmap Font Sc...
by
Gigatron
[April 23, 2024, 05:56:27 pm]
Compile/Convert Delphi pr...
by
Martin_fr
[April 23, 2024, 05:43:11 pm]
Generics - correct syntax
by
Thaddy
[April 23, 2024, 05:40:59 pm]
InstallAware Using Lazaru...
by
msintle
[April 23, 2024, 05:26:36 pm]
Xcode Command Line Tools ...
by
Joseph
[April 23, 2024, 05:16:39 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: design (Read 1905 times)
flori
Full Member
Posts: 196
design
«
on:
March 29, 2020, 06:47:35 pm »
Hi everyone. I have a small software, wich I made lazarus 1.8, but when I installed the new lazarus 2.0.6 I get tangled forms, fonts.
Does anyone know why ?
Im attached 2 pic .
THX
«
Last Edit: March 29, 2020, 06:50:52 pm by flori
»
Logged
marcov
Administrator
Hero Member
Posts: 11459
FPC developer.
Re: design
«
Reply #1 on:
March 29, 2020, 06:51:11 pm »
Check of the font names of the original form are the same.
Logged
flori
Full Member
Posts: 196
Re: design
«
Reply #2 on:
March 29, 2020, 06:56:21 pm »
Yes. I checked it. put everything back together
Logged
jwdietrich
Hero Member
Posts: 1232
Re: design
«
Reply #3 on:
March 29, 2020, 07:52:25 pm »
You might also want to check font metrics.
font.size
and
font.height
are different concepts that may occasionally generate characters of equal size, but this may change with different versions of the LCL, the operating system, the platform and even the user's settings. Make sure to consistently use either
font.size
or
font.height
.
See
https://wiki.lazarus.freepascal.org/Font
for reference.
«
Last Edit: March 29, 2020, 08:07:15 pm by jwdietrich
»
Logged
function GetRandomNumber: integer; // xkcd.com
begin
GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;
http://www.formatio-reticularis.de
Lazarus 2.2.6 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux
flori
Full Member
Posts: 196
Re: design
«
Reply #4 on:
March 29, 2020, 08:23:24 pm »
unfortunately the whole thing is slipped apart
Logged
kupferstecher
Hero Member
Posts: 583
Re: design
«
Reply #5 on:
March 29, 2020, 11:06:00 pm »
Perhaps your system has a DPI-scaling other than 100%?
After Lazarus 1.8 the DPI-scaling was introduced for design time (and unfortunately is enabled by default).
It can be deactivated in the IDE settings.
Logged
flori
Full Member
Posts: 196
Re: design
«
Reply #6 on:
April 03, 2020, 07:08:16 pm »
Where is the DPI?
Logged
flori
Full Member
Posts: 196
Re: design
«
Reply #7 on:
April 03, 2020, 07:10:40 pm »
?? I set all fonts default!!!!
Logged
wp
Hero Member
Posts: 11923
Re: design
«
Reply #8 on:
April 03, 2020, 10:59:01 pm »
Please calm down and stop showing us these angry smileys. It not clear to me from reading the scarce description what is the problem. Is there an issue with scaling? LCL scaling works very well - Lazarus is the best proof for this statement.
Here is my recipe for scaling, I wrote some cross-platform applications recenty they work fine with it:
Make sure that the option "Use LCL scaling" in the project options is set. On Windows, also select one of the "on" options in the "High DPI awareness" combobox. Note that v1.8 hat LCL scaling off by default, while it is on since v2.0 - this may have caused some of your trouble.
Make sure that the property "Scaled" of the forms is set to true. (it is true by default, though)
Do not design your forms with floating controls, I mean always use the Anchor Editor to align controls to each other. Your screenshot shows that labels are misaligned with respect to the associated edit controls. Using the Anchor Editor you can avoid this. And make excessive use of AutoSizing; use the Constraints properties to set up limits for Autosized controls if they should shrink to zero size. Sometimes you may have to add code to determine, for example, the longest one of a stack of labels. The only disadvantage is that once all controls are anchored you cannot move and rearrange them with the mouse any more. This was the reason why I did not use it for a long time. But the benefits of perfectly layed-out forms outweighs it. It is the only way to get independent of font metrics.
Do not switch between machines of different resolutions. Recalculating coordinates back and forth can introduce error. I always develop on 96 ppi, and use VMs at other resolutions only for testing.
When you design at a higher resolution and create controls at runtime you may have to add conversion routines for the coordinates. (
https://wiki.lazarus.freepascal.org/High_DPI#High_DPI_in_Lazarus_1.8_and_above
).
Be careful with third-party controls. Many of them still are not yet ready for the LCL scaling.
Please study the attached demo which scales perfectly. Maybe I should mention also that there is the component TChemText in OPM, which was designed for displaying chemical formulas (at the expense of a slight centering error due to the higher control) and was used in the Win7-screenshot
«
Last Edit: April 03, 2020, 11:13:10 pm by wp
»
Logged
flori
Full Member
Posts: 196
Re: design
«
Reply #9 on:
April 04, 2020, 03:46:53 pm »
ok thank you. Sorry I'm a research biologist!
I did not study programming at university!!!!
The problem was LCL!
Logged
wp
Hero Member
Posts: 11923
Re: design
«
Reply #10 on:
April 04, 2020, 05:22:00 pm »
No need to be sorry. I am a physicist and did not study programming either. It's just a matter of not giving up.
You say the problem was "LCL". What do you mean? The "LCL scaling" checkbox?
Logged
flori
Full Member
Posts: 196
Re: design
«
Reply #11 on:
April 06, 2020, 06:46:13 pm »
Yes. LCL check was inactive. Just work
thank you friend
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
General
»
design
TinyPortal
© 2005-2018