Dialog / Window Color Question

Post Reply
User avatar
Jeff Barnes
Posts: 912
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada
Contact:

Dialog / Window Color Question

Post by Jeff Barnes »

Hi Everybody,

This is most likely a simple thing nut for some reason it is not coming to me...

How do I set a default background color for all my dialogs or windows?
Thanks,
Jeff Barnes

(FWH 12.01, xHarbour 1.2.1, Bcc582)
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Post by nageswaragunupudi »

DEFINE DIALOG / WINDOW ..... COLORS nfore, nback
Regards

G. N. Rao.
Hyderabad, India
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

There is no default for within a FWH application. You have to set the color for each window and dialog. You could create a function to hold static vars containing the colors, or better, create an application class that has those colors vars. Then you can use the object vars to set the colors when you define a window or dialog.

James
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Post by nageswaragunupudi »

1) In MDI environment all MDI Childs inherit colors from the main window. Because we create only MDI Childs within an MDI application, all Child windows have the same colors and fonts by default.

2) If we need globally common default colors for all dialogs and windows there are two ways.
(a) Modify window.prg and dialog.prg.
OR
(b) modify and override commands for creation of windows and dialogs. ( easier )

I normally adopt the second approach whenever I need a different default behaviour than provided by FWH. I usually have one include.ch file for each application ( common for all its modules), which, depending on the need, overrides some commands in FWH.
Regards

G. N. Rao.
Hyderabad, India
Post Reply