Disable/enable window close button?
I have a new Window() open and I want to disable the close button when the window has already been opened. Does anyone know how to do this in Flex?
Ok I got, it's an AIR app.
You can listen to event Closing and preventDefault on it. Check this:
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
closing="closingHandler(event)">
<fx:Script>
<![CDATA[
protected function closingHandler(event:Event):void
if(!forceClose.selected)
event.preventDefault();
]]>
</fx:Script>
<s:CheckBox id="forceClose" label="Force close" />
</s:WindowedApplication>
Regards,
Pablo Souza
Similar Messages
-
How can I disable Minimize, Restore & Close buttons of MDI window?
I'm using Forms6i on Windows XP
How can I disable Minimize, Restore & Close buttons of MDI window?
An urgent reply would be apprecaited.
MURUGESAN.Tin windows property
list of this
close allowed
move "
resize "
maximize "
minimize "
all to set "no" -
Disabling windows close button in dialog
Hi,
I am using Jdev 10.1.3.x(10g)
I am opening a dialog pop up for a functionality. What i want is to force user to use cancel button provided inside dialog to come out of it and want user to not to use windows cance X button.
Is there any way by which i can hide the title bar or disable the close button or on click of widow close i actually click on cancel button throgh java script?
Main concern is i am passing some data from parent to dialog throgh process scope and i want to clear it on cancel. In my application there are many popup dialog which may lead to memeory issue so i seek solution to clear this data once it is not desired any more.
Also i tried Request object to pass the data but in popup it is not recognised.
Suggestion in any direction will be helpful.
Regards,
Kevin ChhedaHi,
answering this question for 10.1.3 since 11g is different and provides a af:dialog component to handle this case. In 10.1.3 the window you open is an external browser window. You cannot disable the close button here because it is part of the browser window that JavaScript cannot control
Frank -
Disabling the window close(x) button
Is there any way to ensure that the window does not get unloaded when the close button (x) is clicked or can we simply disable the close button?
regards
Puneet
Message was edited by:
punsatAs far as I know there is no way to differentiate between window closing events depending on their source.
-
Hi,
We have a requirement to disable/hide the standard close button present in the Internet Explorer while opening a popup window (the X icon present in the top right section of internet explorer window) . Any pointers on how to achieve this would be really helpful.
Thanks in advance.I don't think it is possible to hide X of any window, as it is default feature of explorer by MSDN.
--Mukul -
How to disabled IE's close button
HI:
I want to disabled the IE"S close button ,but I can't know how to do it .Thanks to tell me how to do it ,thank youWrite your own version of IE and don't provide a close button. Then ask everyone to install it.
Otherwise you can't do that, and a damn good thing too. Who the hell want's to go to a site and get a browser window popup that you can't close? Hmm? No one. Get a life. -
How to mark window close button as "unsaved"?
Using SWT, you can change the main window quit/close icon/button (in upper left corner of title bar) to indicate that the file/whatever of the application has not been saved. The code to do that in SWT is something like this -
Shell shell = new Shell(new Display(), SWT.CLOSE | SWT.TITLE | SWT.BORDER | SWT.MIN);
shell.setModified(true);
Is this feature available in Java FX 2.2? If not, has there been a bug/request filed for it?I had a question going in the same direction: "Is there any way to disable the close button in a decorated stage?" but from your answer to the previous question, I guess this is not possible... could you please confirm this? A workaround would be to set an event handler to consume the window close event. Looks like I'll need to go that way. Or could you suggest a better way?I don't think it's possible with to disable the button in JavaFX 2.2 - if you did, it would provide an inconsistent native windowing experience for the user anyway as I've never seen a close button on a Windows 7 app disabled.
However, as you point out, you can capture (and handle or ignore) the events if generated. You can do this by setting an onCloseRequest event handler for the window and calling event.consume() in the handler. (relevant javadoc comment):
https://docs.oracle.com/javafx/2/api/javafx/stage/Window.html#setOnCloseRequest%28javafx.event.EventHandler%29
Called when there is an external request to close this Window. The installed event handler can prevent window closing by consuming the received event.------
You could check out my related answer at StackOverflow: http://stackoverflow.com/questions/12874664/javafx-entirely-customized-windows, for some other thoughts on this on customizing decorated and undecorated windows, but I think most has already been said in this thread. -
I have developed an AIR application and here is my goal, I don’t want users been able to close the main window. I have tried to disable the close button but I thing that it is not possible. I would like to find a way to control that may be in trapping the close event of the window.
Regards,You can listen to the Event.CLOSING event and preventDefault on it, for example:
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
creationComplete="init()">
<fx:Script>
<![CDATA[
private function init():void {
addEventListener(Event.CLOSING, cancelClose);
private function cancelClose(e:Event):void {
if (!allowClose.selected)
e.preventDefault()
]]>
</fx:Script>
<s:CheckBox id="allowClose" label="allow closing" />
</s:WindowedApplication> -
have a small side frame that will only contain a single image. (sort of a preview image) controlled by the main frame.
i want to remove the close window button on this side frame (maximize too, really), but defintily close.
is there a way to do this ?Use a JWindow.
Or use a JDialog and get rid of the title bar:
dialog.setDefaultLookAndFeelDecorated(false) ;
Or if you use a JDialog leave the title bar, but disable the buttons
dialog.setDefaultCloseOperation(DO_NOTHING_ON_EXIT);
dialog.setResizable(false); -
Safari 3.0.4 window close button and Command W not working
Just upgraded to 10.4.11 and Safari 3.0.4, now I cannot close any Safari windows either by the Red button or command W. I am running a Powerbook G4. I had the same problem with previous beta versions of Safari.
I was also experiencing this problem, and removing the library/input managers/SIMBL fixed it. But I dug a bit deeper, and found out that SIMBL looks in library/application support/SIMBL/plugins. I found a file in there called Taboo dated 5/8/2005 and removed it. Problem solved, even with the SIMBL files in the input managers folder.
Hope this helps.
Paul -
Disable/enable a search button
based on whether a search input text is empty or null.
How do I do this in ADF.
Thanks in advance,
Veenanormally its the binding for the attributes that you want to wire with the search field of interest. Are you talking about the cuastom search that you developer.. or the one in af:query?
-
Internet Explorer CLOSE Button for OBPM 10GR3 Presentations
Hi all,
I am using OBPM 10GR3 presentations with a POPUP window.
I already have a close button to close the presentation. This is a Global Interactive Activity which displays the dashboards.
The Global Interactive Activity contains a screenflow and inside the screenflow I have a Interactive Component Call to call the presentation.
Now the presentation opens smoothly and everything is displayed.. When we hit the CLOSE button everything goes away and when we open it again it again comes back to the previous Interactive Component Call and restarts.
BUT
When we Close the window itself instead of using the CLOSE button of the presentations, and we re-open, we get the previous data.
This is because we do not hit the CLOSE button of the presentation instead hit the IE WINDOW CLOSE button on the top right hand corner besides the minimize maximize button.
Therefore the call is still inside the screenflow inside the Global Interactive Activity and therefore it waits for the user to hit the CLOSE button of the presentations otherwise does not close.
How can we resolve this issue?
How can we make sure, that if the user closes the IE WINDOW itself using the CLOSE button, it closes the presentation itself and when re-opened displays the previous presentation?Hi,
First of all this is a training issue with the user. It is not advisable not to press the close button of the IE.
Nevertheles you can disable to close button of the presentaion.
You can remove the x from dialogs by doing this. Open the executionDialog.xhtml file in the <OraBPMEnterpriseHomeDirectory>\webapps\workspace\jsf\common directory (both Studio and Enterprise have this file).
Change the text on line 81 from this:
<oc:Dialog verticalAlign="top" offsetY="40" backColor="#D4E1EB" borderColor="#517B9E"
borderStyle="solid" borderWidth="1px" id="executionDialog#{componentBean.id}"
title="#{fn:getMsg('EXECUTION')}" broadcastName="executionDialog#{componentBean.id}"
maximized="#{componentBean.executionDialogMaximized}" width="#{componentBean.executionDialogWidth}"
height="#{componentBean.executionDialogHeight}" titleBarCssClass="bpmWorkspaceDialogHeader"
displayMaximizeButton="true"
modal="false" jsObjectName="executionDialog#{componentBean.id}">
to this:
<oc:Dialog verticalAlign="top" offsetY="0" backColor="#FFFFFF" borderColor="#FFFFFF"
borderStyle="solid" borderWidth="1px" id="executionDialog#{componentBean.id}"
title="#{fn:getMsg('EXECUTION')}" broadcastName="executionDialog#{componentBean.id}"
maximized="#{componentBean.executionDialogMaximized}" width="#{componentBean.executionDialogWidth}"
height="#{componentBean.executionDialogHeight}" titleBarCssClass="bpmWorkspaceDialogHeader"
displayMaximizeButton="true"
displayCloseButton="false" modal="false" jsObjectName="executionDialog#{componentBean.id}">
This change does a couple things. The addition of the text "displayCloseButton="false"" removes the x button that is causing the undesired results you're getting and setting the colors to #FFFFFF changes the light blue border around dialog boxes to white.
Bibhu -
Adobe air and window.close()
Hi all. I have a simple task to do but I reall don't know how to do this. I created Full screen Adobe Air application which does window.location='http://example.com to external page just in a tag. The problem is that I can't close Air application from that page using window.close(); - just doesn't work. If I load http://example.com into and put a window.close() button after tag it works no problem at all. Anyway I can't use as http://example.com use frames and it stops working properly when loaded to . Could you please help me with that. I hope you understand what I wrote. Please help.
Auta kilka tysięcy złotych taniej? Przebieraj wśród tysięcy ogłoszeń!
Sprawdz >>> http://linkint.pl/f27c6 -
Window: close event handler
I have a button (action="dialog:ADD_MEMBER" useWindow="true" windowEmbedStyle="inlineDocument" windowModalityType="applicationModal" windowHeight="600" windowWidth="700"), which open a new window in the same TaskFlow. This window can be closed by using the special (my af:commandButton) button and by using common window close button ('X'). I want to write my custom close event handler in the second case. How can I do it?
Hi,
don't think you can. Did you check ifthe return listener fires ?
Frank -
Open/close button on tooltips?
Is it possible to have an 'open/close' button? I'd like to have a tool tip button say 'Open' when it's inactive, then say 'close' when it's active.
Try changing the Position of the Tooltip composition to Stacked that will enable the Close button "Part" for you to select. Then change the Show and Hide Target options to On Click. See if this setup fits your purpose.
Thanks,
Vinayak
Maybe you are looking for
-
My sent mail does not show in the sent folder
I can send mail but the mail doesn't show in the Sent mail folder...why is that? I am a Verizon user.
-
How to run a script without Photoshop's GUI or...
within GUI, but without animation of every command in the script? I need to process huge number of pictures - animation makes serious impact on performance... Thanx all.
-
I have files spread out everywhere, but I need to move a project from one computer to another. Is there a pack and go feature which can help me easily move and restore a project? I didn't see anything like this in Volume IV of the manual... Thanks!
-
Why doesn't Energy Saver have an option for displaying "Time" in the menu bar?
Why doesn't Energy Saver have an option for displaying "Time" in the menu bar?
-
Nokia 5800 "USB Mode with phone off"..
Hi all... i recently connected my 5800 to my PC with the phone being off.. it found a different piece of new hardware. Any idea what this is for? Nokia 5800 Xpress Music - Please leave Kudos if I helped you! Thanks!!