Page 1 of 1
Dialog / Window Color Question
Posted: Thu Mar 13, 2008 12:55 am
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?
Posted: Thu Mar 13, 2008 1:45 am
by nageswaragunupudi
DEFINE DIALOG / WINDOW ..... COLORS nfore, nback
Posted: Thu Mar 13, 2008 3:23 pm
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
Posted: Thu Mar 13, 2008 3:55 pm
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.