Lazarus
Programming => LCL => Topic started by: mtanner on August 12, 2017, 01:37:42 pm
-
For various reasons (mainly not having to pay to upgrade Delphi and TeeChart) I am still developing on WinXP - Lazarus is part of my plan to get off XP.
I have various applications, using many TSpinEdits and TFoatSpinEdits. They look good under XP. But when I transfer the apps to Win7, then the controls look rather visually "heavy". And with right-adjusted text in the Spins, the text is jammed right up against the buttons, and the font seems to be bold though it is not set as bold. The buttons appear flat under XP, but not under W7.
Can I somehow control the appearance of SpinEdit (and TSpeedButtons as well) so they look better under W7?
-
Can you show us some screenshots? Have you tried to enable:
Lazarus main main menu > Project > Project Options > Compiler Options > Config and Target > Win32 gui application (-WG)
-
Which Lazarus? I've never seen text jammed to the right. And the buttons look perfectly reasonable. In the attachment there's a screen shot of TFloatSpinEdit, TSpinEdit and TUpDown taken from Win10 (I don't have a Win7 at the moment, but I did not remember any essential difference). Lazarus version is 1.6.4, same results with trunk and 1.8RC.
Are your programs themed? I.e., under Win XP, do they look like Win 95? Drawing of controls is often split in a themed and a non-themed part, and I could imagine that both parts may be different regarding pixel offset etc.
-
I'll try and get a screenshot. I'm just using Laz 1.6.4. If you gave a Win7 system just install Laz and put a TSpinEdit of a form. Same results with creating the app under Win7 or creating it under WinXP and copying the app across to a Win7 system - I guess you would expect that but you never know!
I'll the suggestions above first.
-
My programs are not themed - I wondered if that is what I need to get into. Can you point me to a quick intro to themes please?
-
Here is a screenshot. Top is a TSpinEdit with MS Sans Serif10. Bitton is a TFloatSpinEdit with default font.
-
Yeah,that looks realy old.
Enable themes (described above by Handoko)
Bart
-
I think this is not working if Windows is using classic desktop. Go to the Control Panel, select Designs (or similar, I don't have an Englisch version of Windows) and select "Windows 7 Basic" (instead of "Windows 7 Classic").
Here is a screenshot of an out-of-the-box Windows 7 (in "Win 7 Basic Theme").
-
@wp: TS is on XP?
Bart
-
He is developing on XP, but running the programs on Win 7 - if I don't misunderstand the first post.
-
But that screenshot shows it looks like on Win98. WinXP should looks better than that.
-
The Win32 GUI option is checked by default/ I've tried it checked/unchecked and it makes no difference.
-
Handoko, Yes it looks much better under WinXP, it's under Win7 that it looks bad. Either transferring an exe file compiled under XP, or compiling under Win7 (Lazarus 1.6.4 in bith cases).
-
Try to run that binary on other Win7 machine. The appearance of my Win32 binaries compiled using Linux look like native Win7 application. I think it is not your Lazarus nor your program problem. I guess there is something wrong with your OS, maybe your antivirus?
Or maybe you can try to create a new project and see if it will look like that ugly?
-
It's just the theme... In the attachment there's a screen shot of Win7 Classic Theme - exactly like your's. Compare with reply #7. Switch to Win 7 Basic Theme (use Control Panel as described above), and you'll be fine.
-
Thank you everybody - Win 7 Basic theme fixes it. I probbaly opted for Windows Classi whe I installed Win7, thinking it would be familiar. I am not sure by what logic MicroSoft thought that Windows Classic equates to Win98/2000 appearance rather than XP. Hopefully back to doing something productive now!
-
I include four cases :)
Themed, NotThemed, ThemedClassic, NotThemedClassic