Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2009-06

When do we use clForm, clWindow, clBtnFace?

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

Relating to the bug report that mentions that clForm should rather be the default color for a TCustomForm instead of clBtnFace.

http://bugs.freepascal.org/view.php?id=13577

I fully agree with the bug report - clForm backs a lot more sense that clBtnFace. But that made be think a bit more...

When do we use clForm, clWindow, clBackground and clBtnFace.

What is the difference between clForm and clWindow? Isn't a TForm also a Window? Then again, couldn't clForm and clWindow be removed and we simply use clBackground? If not, where am I supposed to use clBackground then?

These pre-defined colors are quite confusing when you think about it.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Marc Weustink
to Graeme Geldenhuys
Graeme Geldenhuys wrote 17 lines
Hi, Relating to the bug report that mentions that clForm should rather be the default color for a TCustomForm instead of clBtnFace. http://bugs.freepascal.org/view.php?id=13577 I fully agree with the bug report - clForm backs a lot more sense that clBtnFace. But that made be think a bit more... When do we use clForm, clWindow, clBackground and clBtnFace. What is the difference between clForm and clWindow? Isn't a TForm also a Window? Then again, couldn't clForm and clWindow be removed and we simply use clBackground? If not, where am I supposed to use clBackground then?

clWindow is the backgroundcolor of a edit control. When using clBackground, it is clear for "default" controls, but what if I want a panel with the color of the background of an edit (or a form) ?

These pre-defined colors are quite confusing when you think about it.

For the default cases they might be, in tose cases using clDefault would be better, but if you want to color something you need to know the color.

Marc

Reply by email

zeljko
to Graeme Geldenhuys: Relating to the bug report that mentions that clForm should rather be the default color…
Graeme Geldenhuys wrote 17 lines
Hi, Relating to the bug report that mentions that clForm should rather be the default color for a TCustomForm instead of clBtnFace. http://bugs.freepascal.org/view.php?id=13577 I fully agree with the bug report - clForm backs a lot more sense that clBtnFace. But that made be think a bit more... When do we use clForm, clWindow, clBackground and clBtnFace. What is the difference between clForm and clWindow? Isn't a TForm also a Window? Then again, couldn't clForm and clWindow be removed and we simply use clBackground? If not, where am I supposed to use clBackground then?

clWindow = mostly edit controls, comboboxes, and scrollviews. clForm,clBackground = same colors, general widgets color (TCustomForm, TPanel etc ..)
clBtnFace = all kind of buttons ...

under qt it's clear
clWindow = QPaletteBase (QLineEdit, QComboBox, QTextEdit). clForm,clBackground = QPaletteWindow (GENERAL WIDGET COLOR. QWidget, QLabel -> TStaticText, QFrame etc ...)
clBtnFace = QPaletteButton (generally all types of buttons -> QPushButton, QCheckBox, QRadioButton etc .....).

definitelly clBtnFace is wrong as default for general widgets (in CLX clBackground is default color for such widgets).

One more thing. There are GTK2 related colors bugs #7555,#9945 (also I cannot rework some things under Qt palettes) because of this unclear situation.

These pre-defined colors are quite confusing when you think about it.

yes , they are confusing because they are incorrect.

Reply by email