Lazarus

Programming => LCL => Topic started by: mtanner on August 12, 2017, 01:37:42 pm

Title: appeatance of TSpinEdit under Win7 and WinXP.
Post 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?
Title: Re: appeatance of TSpinEdit under Win7 and WinXP.
Post by: Handoko on August 12, 2017, 01:50:27 pm
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)
Title: Re: appeatance of TSpinEdit under Win7 and WinXP.
Post by: wp on August 12, 2017, 02:08:58 pm
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.
Title: Re: appeatance of TSpinEdit under Win7 and WinXP.
Post by: mtanner on August 12, 2017, 02:25:11 pm
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.
Title: Re: appeatance of TSpinEdit under Win7 and WinXP.
Post by: mtanner on August 12, 2017, 02:27:11 pm
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?
Title: Re: appeatance of TSpinEdit under Win7 and WinXP.
Post by: mtanner on August 12, 2017, 03:01:36 pm
Here is a screenshot. Top is a TSpinEdit with MS Sans Serif10. Bitton is a TFloatSpinEdit with default font.
Title: Re: appeatance of TSpinEdit under Win7 and WinXP.
Post by: Bart on August 12, 2017, 04:16:43 pm
Yeah,that looks realy old.

Enable themes (described above by Handoko)

Bart
Title: Re: appeatance of TSpinEdit under Win7 and WinXP.
Post by: wp on August 12, 2017, 05:06:59 pm
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").
Title: Re: appeatance of TSpinEdit under Win7 and WinXP.
Post by: Bart on August 12, 2017, 05:23:21 pm
@wp: TS is on XP?

Bart
Title: Re: appeatance of TSpinEdit under Win7 and WinXP.
Post by: wp on August 12, 2017, 05:47:39 pm
He is developing on XP, but running the programs on Win 7 - if I don't misunderstand the first post.
Title: Re: appeatance of TSpinEdit under Win7 and WinXP.
Post by: Handoko on August 12, 2017, 05:50:56 pm
But that screenshot shows it looks like on Win98. WinXP should looks better than that.
Title: Re: appeatance of TSpinEdit under Win7 and WinXP.
Post by: mtanner on August 12, 2017, 06:01:03 pm
The Win32 GUI option is checked by default/ I've tried it checked/unchecked and it makes no difference.
Title: Re: appeatance of TSpinEdit under Win7 and WinXP.
Post by: mtanner on August 12, 2017, 06:06:03 pm
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).
Title: Re: appeatance of TSpinEdit under Win7 and WinXP.
Post by: Handoko on August 12, 2017, 06:11:38 pm
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?
Title: Re: appeatance of TSpinEdit under Win7 and WinXP.
Post by: wp on August 12, 2017, 06:14:10 pm
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.
Title: Re: appeatance of TSpinEdit under Win7 and WinXP.
Post by: mtanner on August 12, 2017, 06:21:47 pm
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!
Title: Re: appeatance of TSpinEdit under Win7 and WinXP.
Post by: ASerge on August 12, 2017, 07:22:52 pm
I include four cases  :)
Themed, NotThemed, ThemedClassic, NotThemedClassic
TinyPortal © 2005-2018