color of folder dialogs

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

color of folder dialogs

Post by Detlef Hoefner »

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

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
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

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
Detlef Hoefner
Posts: 312
Joined: Sat Oct 08, 2005 9:12 am
Location: Germany
Contact:

Post by Detlef Hoefner »

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
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

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
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

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
Detlef Hoefner
Posts: 312
Joined: Sat Oct 08, 2005 9:12 am
Location: Germany
Contact:

Post by Detlef Hoefner »

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
Contact:

Post by Detlef Hoefner »

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
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Detlef,

Those pesky bosses...

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

Post by Detlef Hoefner »

James,
James Bott wrote:Detlef,

Those pesky bosses...

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

Detlef
Post Reply