Dialog / Window Color Question

Dialog / Window Color Question

Postby Jeff Barnes » Thu Mar 13, 2008 12:55 am

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 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Postby nageswaragunupudi » Thu Mar 13, 2008 1:45 am

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

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10624
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Postby James Bott » Thu Mar 13, 2008 3:23 pm

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

Postby nageswaragunupudi » Thu Mar 13, 2008 3:55 pm

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
User avatar
nageswaragunupudi
 
Posts: 10624
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 76 guests