Subject Re: [IBO] Suggestion For IBO 4.0
Author Geoff Worboys
> > I would like to suggest one feature to session colors. You
> > have provided color properties for data controls which
> > change background colors when in edit, insert, search etc.
> > etc. But font colors are fixed to that of design time which
> > limits selection of bakground colors for visibility
> > purpose. If u provide selection of fonts for each mode
> > then it will be better.

> How do others feel about these suggestions?

One thing you could consider, instead of trying to associate entire
fonts (which gets rather complicated when you get into the details)
you may consider simply updating the controls to change the font color
appropriately.

I do this in my own derivation of TIB_Grid to ensure highlight colors
are matched etc. If you take a look in CustomEditUtil.pas you will
see a small function...

TextColorFromColor( Val: TColor );

which attempts to determine the most appropriate text color from the
supplied color value. It matches system defined colors where
available, otherwises uses a strange little function that I wrote
called ColorBrightness to decide whether to return black or white.

Doing this would make the change relatively simple to install (where
you currently set the background color you also set...
Font.Color := TextColorFromColor( Color );


> > Simillarly for grids default height is not changing
> > automatically when different font is selected it need to
> > be adjusted manually when different font size is selected.
> > If default height is adjusted with maximum of all fonts
> > then some work will further be saved.

This sounds like a good idea. I guess this means that the
DefaultRowHeight property will need an IsStored option on its property
to ensure that the capability is not fixed at designtime settings.


Geoff Worboys
Telesis Computing