Subject RE: [IBO] Using colorscheme
Author Paul Vinkenoog
Hi Riho-Rene,

> But is it possible to find out what is the current active color. I
> hate to write long block
> if(dssEdit)
> color=...
> if(dssDelete)
> color...
> etc.

I _suppose_ (but please check this) that when the OnStateChanged
handler is called, the colors have already changed. If this is true,
you could just copy the color from a know TIB_Edit:

MyStandardControl.Edit := MyIB_Edit.Color;

If it isn't true, maybe it's true for the AfterEdit, AfterDelete
etc. events. You could write a single handler for all these events and
copy the color.

And if that still doesn't work, yes, write a case (or switch in C++)
statement to check the state and copy the colors from the SessionProps.
You only have to write the case statement once, to determine the color.
Then assign the color to all the controls you want.


Greetings,
Paul Vinkenoog