FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour color of folder dialogs
Posts: 312
Joined: Sat Oct 08, 2005 09:12 AM
color of folder dialogs
Posted: Mon Feb 11, 2008 06: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.



I tried with
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
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
color of folder dialogs
Posted: Mon Feb 11, 2008 07: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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 312
Joined: Sat Oct 08, 2005 09:12 AM
color of folder dialogs
Posted: Mon Feb 11, 2008 07: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

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
color of folder dialogs
Posted: Mon Feb 11, 2008 07: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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
color of folder dialogs
Posted: Mon Feb 11, 2008 09: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
Posts: 312
Joined: Sat Oct 08, 2005 09:12 AM
color of folder dialogs
Posted: Mon Feb 11, 2008 10:05 PM

Antonio,

your solution works fine.
Thanks a lot,
Detlef

Posts: 312
Joined: Sat Oct 08, 2005 09:12 AM
color of folder dialogs
Posted: 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

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
color of folder dialogs
Posted: Mon Feb 11, 2008 10:25 PM

Detlef,

Those pesky bosses...

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 312
Joined: Sat Oct 08, 2005 09:12 AM
color of folder dialogs
Posted: Tue Feb 12, 2008 07:53 AM
James,

James Bott wrote:Detlef,

Those pesky bosses...

James


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

Detlef

Continue the discussion