flat style

flat style

Postby Detlef » Sat Apr 09, 2022 7:13 pm

Hi all,
I' still not able to get a dialog with flat controls when using Pelles rc editor for creation.
All get and browse controls have a frame with a small inside shadow.

Image

Could anyone give me some guidance how to get rid of that shadow?
Thanks
-Detlef
User avatar
Detlef
 
Posts: 209
Joined: Mon Feb 07, 2022 9:54 pm

Re: flat style

Postby James Bott » Sat Apr 09, 2022 11:01 pm

Detlef,

This will get you a flat panel on a window. Maybe you need to set the windows API values in your resource editor?

Code: Select all  Expand view
#include "fivewin.ch"
#include "winapi.ch"


Function Main()
   Local oWnd, oPanel1

   Define window oWnd
   
      DEFINE WINDOW oPanel1 ;
         STYLE  nOr(WS_CLIPCHILDREN, WS_CAPTION, WS_THICKFRAME, WS_MINIMIZEBOX ) of oWnd
     
    Activate window oWnd on init (oPanel1:activate())

Return nil
 


I would be cautious about going too far down this rabbit hole. Windows 11 design is a lot different from Windows 10. Under Win 11 panels and other controls also have shadows. Oh, and most Win 11 controls have rounded corners too. Preparing for the inevitable, I would try to emulate Win 11 design now. People do judge a book by it's cover (and software by it's interface).

Note that when you display windows and dialogs on Win 10 both now have built in shadows. This is new with a Windows 10 update. Under Win 11 panels do have shadows, but FW Win 10 apps don't show shadows around panels.

For more on this search the forum for my thread on Windows 11 fluent design. It was last October I think.

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: flat style

Postby Detlef » Sun Apr 10, 2022 9:41 am

James,
many thanks again for your reply.

You are absolutely right, people judge a software by it's interface.
I don't intend to fake windows 11 ui design for my program.
But those sunken gets e.g. have a bit of smell like Windows 3.11 :?

I just want to create a neat clean appearance for my work.
There's someone with the same issue in this forum.
http://forums.fivetechsupport.com/viewtopic.php?f=3&t=41632&sid=11bae6f1c3f921b010e06a660e0653bf
he explained my concern better than i did.

-Detlef
User avatar
Detlef
 
Posts: 209
Joined: Mon Feb 07, 2022 9:54 pm

Re: flat style

Postby Enrico Maria Giordano » Sun Apr 10, 2022 7:05 pm

You have to include the manifest in your resource in order to get the flat style, or use the manifest file.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: flat style

Postby Detlef » Sun Apr 10, 2022 7:37 pm

Enrico,
I have this line in my rc file:

1 MANIFEST "WindowsXP.Manifest"

But i get no flat controls.
User avatar
Detlef
 
Posts: 209
Joined: Mon Feb 07, 2022 9:54 pm

Re: flat style

Postby mtajkov » Sun Apr 10, 2022 7:44 pm

I copy file from c:\fwh2111\samples\winxp\ to my source folder

Best regards
Best regards
Milos

[ FWH 21.11 ] [ xHarbour 1.2.3 Intl. (SimpLex) (Build 20150603) ]
mtajkov
 
Posts: 130
Joined: Sun Mar 08, 2009 4:33 pm

Re: flat style

Postby Detlef » Sun Apr 10, 2022 8:49 pm

mtajkov,
thanks for jumping in.

I did this already. And tried also with "Windows10.Manifest".
But when I say "BORDER: YES" in Pelles rc-editor there is no flat appearance, just the sunken look.

-Detlef
User avatar
Detlef
 
Posts: 209
Joined: Mon Feb 07, 2022 9:54 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 61 guests

cron