Resize effect maintaining the window centered

I have a TitleWindow that I open using the PopUpManager.
PopUpManager.centerPopUp(paymentWindow);       
I would like to apply a resize effect when I show the window.
<mx:Resize id="expand"  widthTo="640" heightTo="480"/>
The problem is that the TitleWindow is resized from the upper left corner to the bottom right corner. So the popup is no more centered. How can I apply the same effect but maintaining the window centered in the screen while it is resized?

I don't understand completely.But below is a piece of code I wrote render a image as a zoom popup and then when i cliked on the pop up it resized to its original size. May be it can help you
use :-
img.addEventListener(MouseEvent.CLICK, image_click);
img.addEventListener(ResizeEvent.RESIZE, image_resize);
PopUpManager.addPopUp(img, this, true);
and
private function image_click(evt:MouseEvent):void {
                    PopUpManager.removePopUp(evt.currentTarget as Image);
private function image_resize(evt:ResizeEvent):void {
                   PopUpManager.centerPopUp(evt.currentTarget as Image);
If you are using image.

Similar Messages

  • Resize effect in the repeater control

    Hi All,
    I developed an application using repeater control.Using repeater control i created 3 buttons.Is it possible to set the resize effect for the buttons in repeater control.I mean if i click on first button,only the first button need to be resized.If i click on secodn button,then only the second button need to be resized.Plz sugest the solution.

    I don't understand completely.But below is a piece of code I wrote render a image as a zoom popup and then when i cliked on the pop up it resized to its original size. May be it can help you
    use :-
    img.addEventListener(MouseEvent.CLICK, image_click);
    img.addEventListener(ResizeEvent.RESIZE, image_resize);
    PopUpManager.addPopUp(img, this, true);
    and
    private function image_click(evt:MouseEvent):void {
                        PopUpManager.removePopUp(evt.currentTarget as Image);
    private function image_resize(evt:ResizeEvent):void {
                       PopUpManager.centerPopUp(evt.currentTarget as Image);
    If you are using image.

  • How to make the text resize to fit the window ?

    Hi,
    I'm making a website using Adobe Edge and I want the text to resize when the window is resized too. I tried some jQuery plugins but had no success. Any help would be greatly appreciated.
    Thanks in advance,
    Rafael Carignato

    See this post your question was already answered there:
    http://forums.adobe.com/message/5045627#5045627
    Here is a sample file of text that re-sizes according to window size:
    http://www.meschrene.puremadnessproductions.net/Samples/Resize-Text/Sample.html
    http://www.meschrene.puremadnessproductions.net/Samples/Resize-Text/Sample.zip

  • Why does Adobe Premiere Pro offer more effects for the windows platform than Mac?

    Every time I find a cool new effect that I would like to use it seems it is only offered on the windows platform.  I am a mac user and wondering why this is.

    A lot of that is inertia, though. 3 or 4 years ago, I would have laughed in your face if you'd told me that we were going to move to a PC-based workflow. Then everybody stopped using FCP, Apple refused to update their Pro towers for, like, 3 years, and released a completely redesigned MacPro that has caused us more headaches than it's worth. PPro makes it super easy to bounce projects back and forth between our Macs and PCs. Mainstream computer hardware has become powerful enough that you don't need a professional workstation to edit video and do basic motion graphics. This is totally anecdotal, I realize, but our PCs are every bit as stable (or unstable!) as our Macs, and we've yet to have a single virus on either Mac or PC (mostly because I don't let warez anywhere near our boxes...). At this point, I literally can't think of a single reason to stick with Mac as a platform; if I can put together a $2000 PC that'll perform more-or-less as well as the $3000 MacPro, why would I choose the more expensive option? I guess you could say "ProRes", but I've never really been a fan of ProRes. Besides, DNxHR will be out in a month or two; that'll be the final nail in the ol' ProRes coffin.
    I honestly don't mean this to come off as an insult, but I think that in 2014, anyone who tries to tell you that Macs are somehow superior to PCs just doesn't know what they're talking about. Aside from the price, the playing field is pretty level... I hope I don't come off as being an anti-Apple, pro-PC fanboi; I'm just a big fan of rational, informed decisions.

  • GridBagLayout resizing while making the window smaller

    Hi,
    I am maintaing a Swing app in which the GridBagLayout is extensively used. The GBL is not my cup of tea, I'd rather replace it by one of the LayoutManagers I seem to be able to control, but GBL is all over the place and not easily replaced. Now for the question: when a window is maximized, the components are resized as expected (made larger), when subsequently the window is made smaller again, the components remain large instead of shrinking back to their normal size and scrollbars appear. Can anyone give me a quick hint or pointer where to start looking in the docs or code to control shrinking?
    Thanks,
    Marnix

    Other windows in the same application do behave better, although most of their components remain at their original size.
    The window is being repainted as scrollbars appear when made smaller. I really would like to experiment with some settings on the constraints but I lack understanding of what parameters control the shrinking back to the "normal" size.
    I'll be checking the min/pref and max sizes settings.
    The fill parm is set to BOTH...
    As to an SSCCE: it is all part of a rather baroque collection of interdependent customized GUI components, I did not invent them but I have to deal with them. If any means of controlling the shrinking exist I'll happily read up on them and excersise the option in my app myself but so far a lack a starting point...

  • Hint on resizing components with the window

    Hi,
    I'm making a web browser and am having a bit of trouble getting the componenets inside ( a JSpliPane with various bits in it) and the top buttons to resize with the main frame when it is resized. At the moment it all stays in the top left at the same size.
    I would like it for the menu to just expand width ways and the JSplitPane to rezise fully to take ip the rest.
    Any ideas on where to start, I have an idea that it may be layout managers, but i cant seem to see how to get one to do this.
    Any pointers would be appreciated cheers (I will happilly look up the API if someone could tell me where to start).
    Cheers :)

    Use a LayoutManager, more specifically BorderLayout.
    JFrame f = new JFrame();
    f.getContentPane().setLayout(new BorderLayout()); //BorderLayout is the default layoutmanager
    f.getContentPane().add(myContentPane, BorderLayout.CENTER);And that's it...

  • Resizing to fill the window.

    I would like my application resize to fill the available canvas, but am unable to figure out to make my StackPane expand to fill the space. My latest attempt is using binding, but I am getting a "A bound value cannot be set." exception on what I figured was a fairly basic usage of the facility:
    <pre>
    public class Test extends Application{
    private StackPane rootGroup = new StackPane();
    public static void main(String[] args) {
    Application.launch(Test.class, args);
    @Override
    public void start(Stage primaryStage) {
    Scene scene = new Scene(rootGroup, 350, 250);
    rootGroup.widthProperty().bind(scene.widthProperty());
    primaryStage.setScene(scene);
    primaryStage.setVisible(true);
    </pre>
    At least, back in the 1.3 days, binding my container's height/width to the scene's height/width is how I accomplished this. How do I accomplish this with 2.0?
    Edited by: JimSmyth on Sep 27, 2011 1:47 PM

    Hi. There are some differences between javafx script binding and javafx2.0 binding.
    Javafx Script Bind:
    btn.layoutX = bind scene.width /2Javafx2.0 Bind:
    btn.layoutXProperty().bind(scene.widthProperty().divide(2.0));In your case you are trying to bind StackPane’s width property which is defined as read only.
    Here is a javafx2.0 binding example:
    import javafx.application.Application;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.scene.Group;
    import javafx.scene.Scene;
    import javafx.scene.paint.Color;
    import javafx.stage.Stage;
    import javafx.scene.shape.Rectangle;
    public class TestBind extends Application {
        public static void main(String[] args) {
            Application.launch(TestBind.class, args);
        @Override
        public void start(Stage primaryStage) {
             Group root = new Group();
            Scene scene = new Scene(root, 300, 250, Color.LIGHTGREEN);
            Button btn = new Button();
            btn.layoutXProperty().bind(scene.widthProperty().divide(2));
            btn.layoutYProperty().bind(scene.heightProperty().divide(2));
            primaryStage.setTitle("Hello World");
            btn.setText("Hello World");
            btn.setOnAction(new EventHandler<ActionEvent>() {
                public void handle(ActionEvent event) {
                    System.out.println("Hello World");
            root.getChildren().add(btn);
            primaryStage.setScene(scene);
            primaryStage.show();
    }

  • Disposing window don't effectively close the window

    Hello.
    Using this small test example, can someone explain (and i've searched in the forum about this) what is wrong with this:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class JFrame1 extends javax.swing.JFrame implements WindowListener,WindowFocusListener,
            WindowStateListener{
        /** Creates new form JFrame1 */
        public JFrame1() {
            initComponents();
            dispose();
         public void windowClosing(WindowEvent e) {
            //A pause so user can see the message before
            //the window actually closes.
            java.awt.event.ActionListener task = new java.awt.event.ActionListener() {
                boolean alreadyDisposed = false;
                public void actionPerformed(ActionEvent e) {
                    java.awt.Frame frames[] = JFrame1.getFrames();
                    if (frames[0].isDisplayable()) {
                        alreadyDisposed = true;
                        frames[0].dispose();
         public void windowDeactivated(WindowEvent e) {
            //displayMessage("WindowListener method called: windowDeactivated.");
         public void windowActivated(WindowEvent e) {
            //displayMessage("WindowListener method called: windowActivated.");
         public void windowClosed(WindowEvent e) {
             System.out.println("............");
            //This will only be seen on standard output.
            //displayMessage("WindowListener method called: windowClosed.");
        public void windowOpened(WindowEvent e) {
            //displayMessage("WindowListener method called: windowOpened.");
        public void windowIconified(WindowEvent e) {
            //displayMessage("WindowListener method called: windowIconified.");
        public void windowDeiconified(WindowEvent e) {
            //displayMessage("WindowListener method called: windowDeiconified.");
        public void windowGainedFocus(WindowEvent e) {
            //displayMessage("WindowFocusListener method called: windowGainedFocus.");
        public void windowLostFocus(WindowEvent e) {
            //displayMessage("WindowFocusListener method called: windowLostFocus.");
        public void windowStateChanged(WindowEvent e) {
            //displayStateMessage(
              //      "WindowStateListener method called: windowStateChanged.", e);
         * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new JFrame1().setVisible(true);
    }what is preventing the window to close itself ?
    thank you.

    I was testing something.
    OK, if i put something like this after the initComponents()
    timer.schedule(new java.util.TimerTask() {
                public void run() {
                 java.awt.Frame frames[] = Janela.getFrames();
                    boolean alreadyDisposed = false;
                    if (frames[0].isDisplayable()) {
                        alreadyDisposed = true;
                        frames[0].dispose();
                        System.gc();
            }, 10*1000);the window closes.
    Why calling dispose() in the 1st example didn't worked ? Could that be because the window has not being allready initializaded, meaning i'm calling dispose() too fast ?

  • Resize effect bug?

    In the mxml file below, if you click 'Expand' the red box on
    the right uses a Resize effect to grow, but it ends up expanding
    way off the screen (producing a scrollbar in the application window
    briefly). Since I have specified 'absolute' layout, shouldn't the
    Resize effect respect the 'right="0"' constraint and expand the red
    box to the left instead of to the right?
    Is there another way of doing this?
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    xmlns="*"
    layout="absolute"
    width="100%" height="400" backgroundColor="yellow" >
    <mx:Script><![CDATA[
    import mx.effects.Resize;
    private var resize:Resize = new Resize();
    private function expand():void
    resize.target = right_box;
    resize.heightBy = 0;
    resize.widthTo = this.width;
    resize.duration = 1000;
    resize.play();
    ]]></mx:Script>
    <mx:HBox id='left_box' width="200" height="100%" left="0"
    backgroundColor="blue" />
    <mx:HBox id='right_box' width="200" height="100%"
    right="0" backgroundColor="red" >
    <mx:Button label="Expand" click="expand()" />
    <mx:Button label="Contract" click="right_box.width=200;"
    />
    </mx:HBox>
    </mx:Application>

    Well, I suppose we could add support to resize to tell it to
    move as well as resize, but we're not setup that way. You can add a
    move effect that will do what you want.
    Objects that are affected by effects don't listen to
    constraints and such because otherwise those things could block the
    effect.

  • I would like to know how to increase the window size and message font size on the the Three Button Dialog.vi

    I like using the Three Button Dialog .vi. However, I am doing a job were I need to use a larger font size. I tried to adjust the core vi but could not make it do what I wanted. Any help would be great.

    Jeff Bohrer wrote:
    1: VI Properties Window Size- Check maintain proportions of window for different monitor resolutions.  (Your users will thank you)
    Jeff,
    Why do you think that is a good idea?  When I opened your VI on my screen, the buttons were cut off at the bottom, and there was a slight cutoff on the right side.  Without scrollbars or the ability to resize the panel, (which I generally wouldn't want on a dialog box anyway) there is no way to be able to see the whole dialog.
    Did your VI show all of the buttons and show all of the text box?  On mine it looked like this.
    What was your screen resolution and your monitor aspect ratio?  Mine is 1680 x 1050 for a 16:10 ratio.  I think you will have problems with checking this box.  I would recommend unchecking it.  Suppose you programmed on a 16:10 screen, but someone else has a 16:9, or even a 4:3.  That is going to screw up the appearance of the dialog unless you take the time to resize the buttons and text inside the dialog.  (And I feel checking the resize option inside the Window Appearance settings just never works right either.)
    If I was the user, I'd appreciate a dialog box that wasn't cut off. 
    Attachments:
    3ButtonDialog.PNG ‏6 KB

  • Sometimes a Firefox window top bar goes weird, and the window controls at extreme top right disappear.

    Sometimes, after its been going quite a long time. a Firefox window top bar goes weird, and the window controls at extreme top right disappear, making it impossible to resize or close the window. The only solution I have found is to individually move the tabs to a new window. The original (bad) one then disappears as soon as the final tab is shifted.

    '''Try Firefox Safe Mode''' to see if the problem goes away. [[Troubleshoot Firefox issues using Safe Mode|Firefox Safe Mode]] is a troubleshooting mode that turns off some settings, disables most add-ons (extensions and themes).
    If Firefox is open, you can restart in Firefox Safe Mode from the Help menu:
    *In Firefox 29.0 and above, click the menu button [[Image:New Fx Menu]], click Help [[Image:Help-29]] and select ''Restart with Add-ons Disabled''.
    *In previous Firefox versions, click on the Firefox button at the top left of the Firefox window and click on ''Help'' (or click on ''Help'' in the Menu bar, if you don't have a Firefox button) then click on ''Restart with Add-ons Disabled''.
    If Firefox is not running, you can start Firefox in Safe Mode as follows:
    * On Windows: Hold the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * On Mac: Hold the '''option''' key while starting Firefox.
    * On Linux: Quit Firefox, go to your Terminal and run ''firefox -safe-mode'' <br>(you may need to specify the Firefox installation path e.g. /usr/lib/firefox)
    When the Firefox Safe Mode window appears, select "Start in Safe Mode".<br>
    [[Image:Safe Mode Fx 15 - Win]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]] article to find the cause.
    ''To exit Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    When you figure out what's causing your issues, please let us know. It might help others with the same problem.

  • How do webpage developers get Firefox to use the windows.resize or windows.moveTo javascript functions that seem to now be passed over?

    Before V7, this code worked and did as requested every time the page was run. Now, it does not work and no error is reported. Google Chrome and Internet Explorer are able to produce th correct result.
    <script type="text/javascript">
    window.resizeTo(325,700);
    window.moveTo(1150,10);
    </script>
    I have a site where I use window.open to create a login window with minimum chrome.
    On successful login, the window that created the login window updates itself to another page. The login window is supposed to resize itself and move to create a console panel to the right of the screen.
    I have tried to update the window from its parent at the point of successful login (flagged by a database change, checked frequently). I have also included code in the new window itself to resize itself to no avail.
    The new code seems to be failing on both the conditions laid out!

    Some conditions were added in 7.0 to avoid abuse of the resize and move functions:
    #Can't resize a window/tab that hasn't been created by window.open.
    #Can't resize a tab if the tab is in a window with more than one tab.
    * https://bugzilla.mozilla.org/show_bug.cgi?id=565541#c24
    There's still some discussion on the bug - including some solutions and troubleshooting for pages that were affected that shouldn't be - and it's being tracked to make sure it doesn't have any adverse effects.

  • I am trying to resize disk space on parallels 6 for windows XP under configure Hardrive and I get the error resizing failed unable to resize last volume the file system of this volume might be damaged or not supported?  I am on a Mac using Parallels 6

    I have been trying to increase my disk space for windows xp on my Imac and I am running parallels 6.  before opening windows I go into configure in parallels and open the hard drive and try to move the allotted disk space from 32 gig to 64 or any other increased gig and then apply and I get the error message: resizing failed unable to resize last volume.  The file system of this volume might be damaged or not supported.  How do I increase the size??  I just also did a disk repair utility with Apple on the Apple side of my IMAC.  Please Help!!   I had uninstalled SQL server on the windows side and needed to uncompress files to install this and then I ran short on disk space.

    This sounds to me that your Parallels XP file system is corrupted and not the OSX file system.
    Have you checked the XP file system while running the Parallels XP yet ?
    However, it would be better to ask such question in the Parallels Forum http://forum.parallels.com/
    Stefan

  • How do I keep a Window resize from holding the CPU and temporaily interrupting the Labview application?

    I am performing a data aquisition in one VI at 10000 Samples per second, then averaging 100 samples every 10 msec.  This runs in a loop and I monitor the time of the loop.  Another VI pulls the single point result of each 10 msec average and plots it to a graph.
    If another window on the Windows XP operating system is re-sized the LabVIEW VI performing the Acquisition suspends until the resizing is complete and I can watch the loop time go from 10 msec to whatever time the other window is being manipulated (100, 200 300 msec...).  The resulting graphical display will then show the next averaged plot point (this is a point to point drawing) without any of the 'real' analog activity that occurred during these +10 msec interruptions (the dataq VI pulls more than 100 samples to perform the averaging).
    Does anyone know how I can prevent the resizing from taking such a high priority on the CPU?  For various reasons I do not want to change my data acquisition scheme.

    chrisger  says: "if you want to pass data without loss you should use a method that allows buffering of data, e.g. queues. Take a look at the LV documentation (there are several solutions, but a named queue is the easiest way to go for such sort of applications)."
    Actually, one VI is running as the executable and the other is called dynamically.  The Dynamic VI uses a queuing vi common to both to access the data.  This part works well, it is the interrupt of the main vi perfoming the data aquisition that is the problem. 
    Because I am not using the full buffer of data, but only whatever portion is acquired and then averaged, the graphing vi essentially gets two (software timed) points and draws between them. 
    I realize software timing is bad, but I am kinda stuck with this scheme.  So, I want to minimize the interruption when a non-related window is re-sized.

  • I cannot move, resize, minimize, or close the browser window despite everything inside the window still working.

    I don't know what details are needed so I'll just rattle off anything that I can think of.
    I am running an Asus laptop with windows 7. I have never had an issue with firefox in the past (beyond the usual freezing and some obvious issues with pop up ads that are par for the course with firefox since adblocker never does what it says.... not really. Lets be honest.) I am using Avast for my virus protection and it is also up to date.
    My issue started about an hour ago when firefox stopped responding. The video I had playing kept going but I could not interact with anything. Assuming the program froze for the billionth time that week I rebooted it. This has always solved freezing issues in the past. Now, however, firefox is doing something new.
    I can access the menus and almost everything on the window itself except for the minimize/maximize/close buttons, I cannot move the window at all, and I cannot manually resize it. I have also noticed that although videos will play, I can only click on their buttons if there is another smaller window overtop of firefox. The video controls will only appear that way and when I click them firefox naturally comes to the front and the video responds with the button I used but the buttons are gone again and I cannot resume playing without the smaller window back in front to make the buttons show again.
    It's as if half of firefox is frozen while the other half is still running somehow.
    I have no themes that could be causing this. Literally none. I only use firefox for the things that can no longer be opened in Opera so I have no need for any theme beyond default. The only addons I installed on purpose were adblockers (lord knows why. they don't DO anything.) though several other random things seem to have been installed over time to aid in one thing or another. Various plugins and players and versions of java, that sort of thing. But I have everything (and i mean EVERYTHING) in the addon menu disabled.
    I have tried booting it up in safe mode (the program, not windows) and the problem is still there except now it won't show the menu bar at all unless I press the alt key first and even then it wont let me actually click on anything in the menu bar. When I try the whole bar vanishes. I had to close firefox with the task manager.
    Rebooting will fix the issue for about 15 seconds before it all comes back.
    Any attempts at updating have failed as it says I am already up to date on everything so I don't know what its issue is.
    It's not an urgent issue right now as most of what i need to do can be done on the half screen window I am using, but some of my sites have buttons that literally vanish in anything but full screen and I imagine that this will be a much greater annoyance within a few days.

    After following all the instructions given, I poked around safe websites as suggested. I am not sure why this step was needed, as websites functioned rather normally before I came here but I did it anyways and found that the websites still work the same as they did. I can still do everything I used to be able to do. I see no change in the function of the websites.
    However, I still cannot resize, close, or move the browser window. I don't know if Netflix is a safe site or not (too many conflicting opinions on that one from the masses) so I don't know if the issue with the vanishing buttons is still there, but all the issues I had with the browser window itself is still there.
    Even in safe mode the browsers three window control buttons on the top right refuse to let me use them and the window itself will refuse to be moved around.

Maybe you are looking for

  • SetPreferredSize Error

    We have a thick client java application that uses swing classes. One of our dialog windows uses the SetPreferredSize method from the JComponent class to set the dimension of a date data entry field. We recently noticed a problem starting to pop up at

  • Basic logic for date

    Hi Folks, I have a v_date variable to hold a date value.Now my requirement is:         v_date:= SYSDATE+2 if date is going to change in next 1 Hour. Else assign v_date:= SYSDATE+1 How to achieve it please. Thanks in advance. gvk.

  • Help am new to adobe

    How do I attach a photo (I pad album) to a PDF form I'm filling out and want to e-mail?

  • Enhanced features for Nokia Messaging

    Hi there, Does anyone know when Nokia are planning for enhanced features for Nokia Messaging? The two features I have read about in some early reviews that I'm most interested in are Meeting Requests being integrated in to the Calendar, and to a less

  • YouTube and Adobe Flash Player 13

    Within the last day, I have not been able to watch YouTube videos (on any browser). When I click to watch a video, the circles will spin on a black screen as if it wants to load, but nothing happens. I had the same issue back in March but was able to