I am trying to code a listItem which will have 2 values "New" and "Edit". I also have a search (Push Button) in the same canvas. I want to disable the Search button when I have selected "new" in the list item and enable it when "Edit" is selected in the list item.
Here is my code : I am using Oracle Forms 6i , WHEN_LIST_CHANGED Trigger ..
begin
if :CONTROL.LI_DO='New' then
go_item('PB_SEARCH');
SET_ITEM_PROPERTY('PB_SEARCH',enabled,property_false);
else if :CONTROL.LI_DO='Edit' then
go_item('PB_SEARCH');
SET_ITEM_PROPERTY('PB_SEARCH',enabled,property_true);
end if;
end if;
end;
Any help is appreciated .
3条答案
按热度按时间noj0wjuj1#
Been a while since I did forms, but can you disable an item that has current focus?
I.e. navigate (GO_ITEM) to another item then try to disable PB_SEARCH.
py49o6xq2#
After those regulations, you may use the code below for "WHEN-LIST-CHANGED";
e1xvtsh33#
You have to know the concept of using enabled property. The following blog illustrate this with an example clears the point of misunderstanding of using 'enabled'property alone.
Pls. follow the solution steps you should be familiar with the four required properties in co-ordinate with each together to enable and disable an item