Subject | Re: BrowsingColor runtime change |
---|---|
Author | Rick Roen |
Post date | 2005-04-28T13:48:39Z |
--- In IBObjects@yahoogroups.com, "radevojvodic" <rvojvodic@r...>
wrote:
are controlled by the default IB_Session that is created at
startup. If you change the browsing color property it would then
change for all connected components.
A possible method to acomplish what you want is to set the IB_Query
or whatever component feeds the edit boxes in question to ignore the
default color scheme - Query.ColorScheme := False;
Then in the IB_Query DataSource use the OnStateChange method to
check if the table is in dssBrowse state. But then you still have to
change the colors of the edit boxes manually. One way to do this is
to put them all on a panel then iterate through the components on
the panel, check if they are TIB_EDIT and change their color.
Something like this (code not tested):
for i := 0 to PanelEdit.ComponentCount - 1 do
if PanelEdit.Component[ i ] is TIB_EDIT then
TIB_Edit( PanelEdit.Component[ i ].Color := <whatever>;
Rick
wrote:
> Hi all,lose
>
> Does anyone know how to change BrowsingColor when IB_Datasource
> focus?moment.
>
> I have a Master-Detail Form with one updatebar. It controls either
> master or detail depending on focused dataset. I want to change
> browsingcolor to visualy show user which is controled at the
>AFIK the browsing and other default colors (editing,deleting etc.)
> Rade.
>
> (Or maybe someone has better solution for the situation)
are controlled by the default IB_Session that is created at
startup. If you change the browsing color property it would then
change for all connected components.
A possible method to acomplish what you want is to set the IB_Query
or whatever component feeds the edit boxes in question to ignore the
default color scheme - Query.ColorScheme := False;
Then in the IB_Query DataSource use the OnStateChange method to
check if the table is in dssBrowse state. But then you still have to
change the colors of the edit boxes manually. One way to do this is
to put them all on a panel then iterate through the components on
the panel, check if they are TIB_EDIT and change their color.
Something like this (code not tested):
for i := 0 to PanelEdit.ComponentCount - 1 do
if PanelEdit.Component[ i ] is TIB_EDIT then
TIB_Edit( PanelEdit.Component[ i ].Color := <whatever>;
Rick