Home » Developer & Programmer » Forms » Disable a button (Oracle Forms 6i)
Disable a button [message #312417] Tue, 08 April 2008 18:03 Go to next message
angelaldixon
Messages: 9
Registered: April 2008
Junior Member
I am new to oracle forms and i'm updating existing code. All i want to do is disable a button on a certain condition...

if fdata_rec.frozen = 'Y' then
:base_buttons.flight_departed := 'FROZEN';
elsif fdata_rec.flight_cancelled = 'Y' then
:base_buttons.flight_departed := 'FLIGHT CANCELLED';
set_item_property('base_buttons.push_merge',enabled,property_false); -- @ad - BZ4582
elsif fdata_rec.fdept_actual_dt is not NULL then
:base_buttons.flight_departed := 'FLIGHT DEPARTED';
set_item_property('base_buttons.push_merge',enabled,property_false); -- @ad - BZ4582
else
:base_buttons.flight_departed := NULL;
end if;

I added the 2 lines ending in @ad - BZ4582. The 'FLIGHT DEPARTED' displayes but the button is not greyed out. What am i doing wrong?? I moved that same line above the if/else block but it still does not grey out. HELP!!!

thanks for any help.
Re: Disable a button [message #312444 is a reply to message #312417] Tue, 08 April 2008 20:36 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Please read the 'sticky' at the top of the forum. Please use 'code' tags.

You did recompile and generate the form, right?

Put a 'message('asdf');pause;' pair of commands in your modifed code to PROVE that you are running the modified version of the form.

David
Re: Disable a button [message #312445 is a reply to message #312417] Tue, 08 April 2008 20:43 Go to previous messageGo to next message
angelaldixon
Messages: 9
Registered: April 2008
Junior Member
Hi David,

I did recompile & regenerate the form. I changed one of the labels and it displayed on the form.

I was able to make the button disapper alltogether but not just grey out.

thanks!
Re: Disable a button [message #312459 is a reply to message #312445] Tue, 08 April 2008 23:39 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Please confirm that
set_item_property('base_buttons.push_merge',visible,property_false); 
causes the button to 'disappear' but
set_item_property('base_buttons.push_merge',enabled,property_false); 
does not cause any visual change at all.

David
Re: Disable a button [message #312652 is a reply to message #312417] Wed, 09 April 2008 09:32 Go to previous message
angelaldixon
Messages: 9
Registered: April 2008
Junior Member
Hi David

I found the problem Smile

After I was disabling the button, later in the process (which I did not realize was being called) other code was enabling it again.

thanks for your help!
Previous Topic: open document in web
Next Topic: Execute_query problem
Goto Forum:
  


Current Time: Sat Jul 22 10:07:06 CDT 2017

Total time taken to generate the page: 0.08465 seconds