color of folder dialogs

color of folder dialogs

Postby Detlef Hoefner » Mon Feb 11, 2008 6:43 pm

Hi All,

i would like to change the background color of a folder's subdialogs.
The default color is not suitable for the color of my TsButtons.

Here a picture to see that the button color doesn't harmonize with the background.

Image

I tried with
Code: Select all  Expand view
ACTIVATE DIALOG oDlg;
      ON INIT aEval( oFold:aDialogs, { | oD | oD:SetColor( GetSysColor( COLOR_BTNTEXT ), GetSysColor( COLOR_BTNFACE ) ) } )
But no success.

The use of WindowsXP.Manifest seems to be the cause of not changing colors.
But without this theme all other buttons look very 'vintage' :? .

Is there a way to get other background colors?

Thanks for every idea in advance.
Detlef
User avatar
Detlef Hoefner
 
Posts: 312
Joined: Sat Oct 08, 2005 9:12 am
Location: Germany

Postby James Bott » Mon Feb 11, 2008 7:17 pm

Detlef,

Changing the dialog color to gray will also look vintage and it won't change the fact that the current buttons and icons look vintage.

I would suggest changing to standard text only buttons. These will inherit the theme and look much better.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Detlef Hoefner » Mon Feb 11, 2008 7:32 pm

James,

i'll think about your suggest.

Do yo know a way to add a menu to a button like in my picture?
This was very easy with TsButton.

Regards,
Detlef
User avatar
Detlef Hoefner
 
Posts: 312
Joined: Sat Oct 08, 2005 9:12 am
Location: Germany

Postby James Bott » Mon Feb 11, 2008 7:38 pm

Detlef,

>Do yo know a way to add a menu to a button like in my picture?
>This was very easy with TsButton.

Hmm. You can do it with a buttonbar button, but I have not tried it with a regular button. I do use TSButton myself--it is a nice class.

How many menu items do you have? If not too many, perhaps you could use a separate button for each instead.

Note that buttons calling menus are not common except on toolbars so maybe it is better to avoid it if you can.

Another option would be a group box containing a combobox and a Print button.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Antonio Linares » Mon Feb 11, 2008 9:46 pm

Detlef,

If you are using themes in your dialogboxes, then you could use FWH TButtonBmp buttons that use themes and show bitmaps too.

If you want to keep using those buttons, and change the dialogs colors, then you need to change this:

oFolder:aDialogs[ n ]:bEraseBkGnd = nil

or create a function DrawPBack() in your main PRG that fills the dialog the way you want. Please note how it is used from Class TFolder:

oDlg:bEraseBkGnd = { | hDC | DrawPBack( oDlg:hWnd, hDC ), 1 }
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Detlef Hoefner » Mon Feb 11, 2008 10:05 pm

Antonio,

your solution works fine.
Thanks a lot,
Detlef
User avatar
Detlef Hoefner
 
Posts: 312
Joined: Sat Oct 08, 2005 9:12 am
Location: Germany

Postby Detlef Hoefner » Mon Feb 11, 2008 10:14 pm

James,

as usual you are right concerning the design rules of developing Window applications.
But ( as usual too ) my boss wants the screens as they were before under 16bit FW except all other themed controls.

If i had time i would follow your direction and Antonio's advices about TButtonBmp to create a proper ui design.

Thanks and regards,
Detlef
User avatar
Detlef Hoefner
 
Posts: 312
Joined: Sat Oct 08, 2005 9:12 am
Location: Germany

Postby James Bott » Mon Feb 11, 2008 10:25 pm

Detlef,

Those pesky bosses...

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Detlef Hoefner » Tue Feb 12, 2008 7:53 am

James,

James Bott wrote:Detlef,

Those pesky bosses...

James


yeah, i would like them to read some of your guides :wink: ...

Detlef
User avatar
Detlef Hoefner
 
Posts: 312
Joined: Sat Oct 08, 2005 9:12 am
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Enrico Maria Giordano and 66 guests