Home » Developer & Programmer » Forms » On Button Trigger If Tab Page = My page then New_form('e:\new.fmx') (Developer 6I, Database 10g window XP)
On Button Trigger If Tab Page = My page then New_form('e:\new.fmx') [message #405486] Thu, 28 May 2009 00:55 Go to next message
shahzaib_4vip@hotmail.com
Messages: 376
Registered: December 2008
Location: karachi
Senior Member
Well i want to create a trigger in Push Button


I have 2 Tab page Date_wise and Uptodate and on Push button OK

Now i need when my tab page = date wise and i press ok button its go to my form ('e:\new.fmx')

And when tab page = Uptodate and i press ok button its go to
My 2nd form ('e:\upto.fmx')


Regards


Shahzaib Ismail
Re: On Button Trigger If Tab Page = My page then New_form('e:\new.fmx') [message #405487 is a reply to message #405486] Thu, 28 May 2009 00:57 Go to previous messageGo to next message
shahzaib_4vip@hotmail.com
Messages: 376
Registered: December 2008
Location: karachi
Senior Member
I have 2 Canvas one is Tab Canvas and other is Content Canvas


Regards


Shahzaib
Re: On Button Trigger If Tab Page = My page then New_form('e:\new.fmx') [message #405498 is a reply to message #405487] Thu, 28 May 2009 01:43 Go to previous messageGo to next message
Littlefoot
Messages: 20895
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Put one button to each tab page (so that you'll have two push buttons). Every button would then have its own code (i.e. call different forms).
Re: On Button Trigger If Tab Page = My page then New_form('e:\new.fmx') [message #405501 is a reply to message #405486] Thu, 28 May 2009 02:04 Go to previous messageGo to next message
shahzaib_4vip@hotmail.com
Messages: 376
Registered: December 2008
Location: karachi
Senior Member
Thanks for your reply

if this is possible to use if /end_if in push button Trigger for example i want to use this

if 
tab_page='this' 
Then 
new_form (.....)
Else
New form (....)
End if;



Regards


Shahzaib Ismail
Re: On Button Trigger If Tab Page = My page then New_form('e:\new.fmx') [message #405506 is a reply to message #405486] Thu, 28 May 2009 02:39 Go to previous messageGo to next message
shahzaib_4vip@hotmail.com
Messages: 376
Registered: December 2008
Location: karachi
Senior Member
Thanks a lot Little Foot

I done this with alternative way as you told me to create 2 Button so i create and write this trigger which solve my problem

DECLARE
    tp_name varchar2(30);
BEGIN
-- Retrieve the NAME of the top most tab page using the built-in GET_CANVAS_PROPERTY function. Pass in the name of the Canvas your tabs are in and the system variable topmost_tab_page which stores a property number
tp_name := GET_CANVAS_PROPERTY('CANVAS3',topmost_tab_page);
 
-- Perform specific tasks based on the name of the top most tab
IF tp_name = 'DATE_WISE' then
   SET_ITEM_PROPERTY('OK',VISIBLE,PROPERTY_TRUE);
   SET_ITEM_PROPERTY('OK',ENABLED,PROPERTY_TRUE);
   SET_ITEM_PROPERTY('OK2',VISIBLE,PROPERTY_FALSE);
ELSIF tp_name = 'UPTODATE' then
   SET_ITEM_PROPERTY('OK2',VISIBLE,PROPERTY_TRUE);
   SET_ITEM_PROPERTY('OK2',ENABLED,PROPERTY_TRUE);
   SET_ITEM_PROPERTY('OK',VISIBLE,PROPERTY_FALSE);

END IF;
 
END;



Thanks for the idea Little Foot


Shahzaib Ismail
Re: On Button Trigger If Tab Page = My page then New_form('e:\new.fmx') [message #405551 is a reply to message #405486] Thu, 28 May 2009 06:22 Go to previous messageGo to next message
shahzaib_4vip@hotmail.com
Messages: 376
Registered: December 2008
Location: karachi
Senior Member
Problem


In ok button i have a trigger which relate to 1 text item

if any thing written in text item and i set ok button property visible false then its give me message cannot set displayed attribute in block21.ok


Any idea?


Regards


Shahzaib Ismail
Re: On Button Trigger If Tab Page = My page then New_form('e:\new.fmx') [message #405571 is a reply to message #405551] Thu, 28 May 2009 07:29 Go to previous message
Littlefoot
Messages: 20895
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I'm not sure I understood the problem, but - perhaps you (actually, focus) is still in that text item so you can't make it "invisible". Try to first move out of it (GO_ITEM to some other item), and then change its visibility.
Previous Topic: Icon On Tab Page
Next Topic: Session Locks... Please help this is urgent... merged
Goto Forum:
  


Current Time: Mon Dec 05 21:10:19 CST 2016

Total time taken to generate the page: 0.15539 seconds