I'm forced to use Oracle Form Builder 10.1.2.3.0. An ideal control I can use in the form for a particular item is a List Item
using a List Style
called Combo Box
.
Using this control, I can use set_item_property
in a PRE-FORM
trigger to set the background color of the list items to match the Canvas color.
The default background color of the items is white but that's not the biggest part of the problem. What is a pretty big UI problem is the color of the items after a selection is made: a horrible mustard color. I prefer something more Spartan and certainly something other than screaming "Hey! Look at me!".
When I run the form, everything is good until I choose an item in the list. Afterwards, the background of the selected item is mustard. And each popup of the list shows the items with a mustard background.
I figured I could add triggers to the Item to reset the background color but that didn't work. I created the following triggers to no avail:
. WHEN-LIST-CHANGED
. POST-CHANGE
. WHEN-VALIDATE-ITEM
. WHEN-NEW-ITEM-INSTANCE
I couldn't find any other trigger names that might be useful.
Is there hope for the code to force my UI preferences?
Before any action upon the control:
During the first popup:
After selecting an item during the first popup:
Second popup:
If the
Data Block
containing the item is not a database item, then you can alter that block so that it is not updateable. If you do that, then the mustard color won't be used.It seems the purpose of the change in color (to mustard) is a visual clue that changes to the database have not been committed. But if the
Data Block
is not a database block, then there's no need for the visual clue because no changes would be possible.I changed
DML Data Target Type
fromTable
toNone
and the mustard color no longer appears.The other settings which I didn't change but which might also be relevant are:
Even if it is a database item, you can set the item's update_allowed property to false in its
WHEN-LIST-CHANGED
trigger and set it to property_true in itsWHEN-MOUSE-CLICK
trigger. This is not perfect because if you click on a list item's text instead of the down arrow, then you still get the mustard but at least after you're done, the mustard is gone.