Home » Developer & Programmer » Forms » how to make button show and hide window ?
icon5.gif  how to make button show and hide window ? [message #278805] Mon, 05 November 2007 14:06 Go to next message
Hany Freedom
Messages: 256
Registered: May 2007
Location: Egypt
Senior Member

I want button in my form show the second window when I press it , and when I press it again hide the second window , what I mean exactly I want the same button hide and show the same window(the another window).

I attached form to understand what I mean exactly , the when-button-pressed trigger on item 'BLOCK4.SHOW' have two built-in:-
SHOW_WINDOW('THE_ANOTHER_WINDOW');
HIDE_WINDOW('THE_ANOTHER_WINDOW');

of course not right to write together , but I want just to see what I mean.

I'm waiting for your answers , and thanks.
  • Attachment: SHOW_HIDE.zip
    (Size: 67.19KB, Downloaded 174 times)
Re: how to make button show and hide window ? [message #278853 is a reply to message #278805] Tue, 06 November 2007 00:23 Go to previous messageGo to next message
Hany Freedom
Messages: 256
Registered: May 2007
Location: Egypt
Senior Member

Hello ??????? any answer ??!!!!!
Re: how to make button show and hide window ? [message #278865 is a reply to message #278853] Tue, 06 November 2007 01:04 Go to previous messageGo to next message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
Still no reply? That's odd... perhaps it has something to do with attaching a ZIP file? I know I won't download it.

MHE

[Updated on: Tue, 06 November 2007 01:05]

Report message to a moderator

Re: how to make button show and hide window ? [message #278870 is a reply to message #278865] Tue, 06 November 2007 01:11 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
If you want to do that with the same button, I'd say that you'll need to use some kind of a flag (possibly a global variable or a parameter?) which would tell the WHEN-BUTTON-PRESSED trigger which window is active (or whichever information you choose). It also means that you'll have to include IF-THEN-ELSE into the trigger.

P.S. Forgot to mention ... our lives are not dedicated to solving your problems. Read the OraFAQ Forum Guide to learn how to behave here.

[Updated on: Tue, 06 November 2007 01:12]

Report message to a moderator

Re: how to make button show and hide window ? [message #278873 is a reply to message #278853] Tue, 06 November 2007 01:24 Go to previous messageGo to next message
mudabbir
Messages: 235
Registered: April 2006
Location: Kuwait
Senior Member

Follow the below steps

1.Go to the windows property of 'THE_ANOTHER_WINDOW' and change the property "Window Style" from "Document" to "Dialog"

2. create a field in block4 and name it as val (number 1).

3. Create a trigger "WHEN-NEW-FORM-INSTANCE" and write this code
:block4.val := 1;


4. On the "WHEN-BUTTON-PRESSED" trigger on "SHOW" write the below code

if :block4.val = 1 then
	SHOW_WINDOW('THE_ANOTHER_WINDOW');
	:block4.val := 0;
else
	HIDE_WINDOW('THE_ANOTHER_WINDOW');
	:block4.val := 1;
end if;	


This is what you wanted.
Re: how to make button show and hide window ? [message #278934 is a reply to message #278873] Tue, 06 November 2007 06:21 Go to previous message
Hany Freedom
Messages: 256
Registered: May 2007
Location: Egypt
Senior Member

Thank you MR.mudabbir .... you really the Best.

[Updated on: Tue, 06 November 2007 06:22]

Report message to a moderator

Previous Topic: View and Canvas ???
Next Topic: Record_property
Goto Forum:
  


Current Time: Thu Dec 08 18:09:00 CST 2016

Total time taken to generate the page: 0.10225 seconds