QBE colors with vcl styles

Hi Marco,
I'm using DOA 4.1.3 / Delphi XE2 and I'm having problems with QBE background colors not displaying properly
when using the new shiny vcl styles.
I had to find out that with styles there is no (easy) way to set the background color of a component.
As my application has lots of input fields (DBEdits,DBLookupcombos, etc.) on one form,
we have put quite some effort into the visual design (e.g. highlighting mandatory fields, contrasting panels, etc.).
The application also uses QBE, so the QBE background color functionalty used to come in extremely handy.
I managed to work around most of my visual design problems using StyleHooks
(like explained here:http://stackoverflow.com/questions/9130945/delphi-xe2-disabling-vcl-style-on-a-component),
however QBE background colors won't show in DBedits that are assigned to number fields.
Do you have any Ideas about how to get this to work eventually (other than not using Styles in the first place)?

Thanks in advance
Horst
 
I think you cannot use the TQBEDefinition.BackgroundColor in this situation, but we'll look into this.

As a workaround you may need to explicitly set/reset the visual properties of the QBE fields controls when entering/leaving QBE mode.
 
Thanks for the real quick reply Marco,
Actually I already tried to do what you propose as a workaround, unfortunately to no avail.
Its a pretty strange behaviour, as basically QBE background colors do work OK with stringfields and datefields when the Stylehook is applied for the DBEdits. Its only the Number fields that just wont do the trick...
I wonder if this might somewhat relate to what you once stated here:https://forums.allroundautomations....1&Main=1674&Words=colors&Search=true#Post5331
about the "Queriable" property not being taken into account...because thats the only property I am allowed to check for Number fields...just a thought...anyway...

Thanks again
Horst
 
Last edited:
Update:
I just found out that even the DBEdits with number fields assigned actually show the QBE background color, but only when they get the focus.
Too bad they lose the color again when they lose the focus, so once setting the focus to each field and then back to the previously focused
control in the BeforeQBE eventhandler doesn't help either.

have a nice day..
Horst
 
Back
Top