FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Dialog / Window Color Question
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
Dialog / Window Color Question
Posted: 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)
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Dialog / Window Color Question
Posted: Thu Mar 13, 2008 01:45 AM

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

Regards



G. N. Rao.

Hyderabad, India
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Dialog / Window Color Question
Posted: Thu Mar 13, 2008 03: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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Dialog / Window Color Question
Posted: Thu Mar 13, 2008 03: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

Continue the discussion