ScriptUI window.minimized = true; on Mac

I have custom palettes for Illustrator who have the ability to get out of the way, similar to native pallets.  Under Windows, my reduced = true; work order and shrinks palette in a small bar, that I love.  However, same command on Mac does not have the case.

#target illustrator
#targetengine main
function myPanel(){
    var arr = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];


    function paletteWindow(){
        var w = new Window('palette', 'My Panel', undefined, {resizeable: true});
        var g1 = w.add('group');
        var t = g1.add('treeview', undefined, []);   t.size = [200, 450];
        for(var i=0; i<arr.length; i++){
            var item = arr[i];
            var n = t.add('node', item);
        }
        t.onDoubleClick = function(){
            if(t.selection != null && t.selection.text != ''){
                alert(t.selection.text);
            }
        };


        var btn_min = w.add('button', undefined, 'Minimize');
        btn_min.onClick = function(){
            w.minimized = true;
            w.update();
        }


        w.onResizing = w.onResize = function () {this.layout.resize ();}
        w.onShow = function(){
            w.minimumSize.width = 220;
            w.minimumSize.height = 100;
            t.items[1].expanded = true;
        }
        this.show = function(){w.show();}
    }
    var thisPaletteWindow = new paletteWindow(); // have to call it like this, or it disappears.
    thisPaletteWindow.show();
}


myPanel();

AHA this is something a little better.

Also, I suppose there is no reason to pass an object if it can be kept outside the functions of palette. Don't know why, I even thought that it was the way to go?

#target illustrator
#targetengine main

function myPanel(){
    var arr = [];
    for(var i=33; i<123; i++){
        arr.push(String.fromCharCode(i)+" ------------ text line");
    }

    function tinyWindow(storeObj){
        var w = new Window('palette', 'MiniPanel', undefined, {borderless: false, closebutton: false}); w.spacing = 0; w.margins = [0,0,0,0];
        var loc = (SETTINGS.syncLocations) ?  storeObj.bigWindowLocation : storeObj.tinyWindowLocation ;
        w.location = loc;
        var p = w.add('panel'); p.size = [100, 42];
        var btn = p.add('statictext', undefined, 'Maximize');
        this.show = function(){w.show();}
        btn.addEventListener('mousedown' , function(){
            storeObj.tinyWindowLocation = w.bounds;
            var thisPaletteWindow = new paletteWindow(storeObj);
            thisPaletteWindow.show();
            w.close();
        });
    }
    function paletteWindow(setupObj){
        var w = new Window('palette', 'My Panel');
        var loc = (SETTINGS.syncLocations) ?  setupObj.tinyWindowLocation : setupObj.bigWindowLocation;
        w.location = loc;
        var g1 = w.add('group');
        var t = g1.add('treeview', undefined, []);   t.size = [200, 450];
        for(var i=0; i 
         

Tags: Illustrator

Similar Questions

  • Get pop-up windows from: Advanced cleaner Mac and Mac Adware Cleaner. Are they those recommended by Apple? These come from Apple?

    I have an Imac8, using OS X el capitan, 24 ", realized in 2008. Get pop-up windows from: Advanced cleaner Mac and Mac Adware Cleaner. Are they those recommended by Apple? These come from Apple?

    No, they are not, they are horrific scams and are not in any way recommended by Apple - what made you think they were?

    Frequent jump - rises as it says have adware - try to do a scan with Malwarebytes: http://malwarebytes.org/antimalware/mac.

  • I tried to install windows 7 on my mac desktop now, I have a white screen? Help any ideas?

    I tried to install windows 7 on my mac desktop and now I have a white screen. any ideas to return me to the world of apple?

    How have you tried to install Windows 7?

  • I want to transfer my files to my external hard drive free windows click on my mac, it recognizes the drive but I can't nothing or see the files. Any help is appreciated

    I need to transfer my files to my external hard drive free windows click on my mac.  I can see the drive but cannot do anything or transfer.  any help is appreciated.

    The drive does not appear in the Finder?  Do you get an icon for it on your desktop?

    You say that it recognizes the drive, how exactly, what is the point?

    What happens when you try to use it?

    How the drive is formatted?  Is it encrypted?

  • The update for the video player is for Windows, I have a Mac, is an another scheduled update?

    I received two notifications that the video player for Firefox should be updated. When I try to install the update, I get the message that it cannot do so because it is impossible to run Windows applications on a Mac. An update is planned for Macs? Also, if an update is only for Windows, is there a way I can indicate that I don't need, so I continue to receive messages?

    You have malicious software! (Yes, Macs can get malware).

    Please remove this extension and see if that helps: MediaPlayer 3.3.2

    You can do this on the page modules. Either:

    • CMD + SHIFT + a
    • "3-bar" menu button (or tools) > Add-ons

    In the left column, click Extensions. Then find this suspicious extension on the right side and remove (or, in case of doubt, disable).

    Often, a link will appear above at least an extension disabled/removed to restart Firefox. You can complete your work on the tab and click one of the links in the last step.

    Which solves the misleading guests?

  • Uncloseable pop-up windows in firefox for mac

    Hello

    Some Web sites will open the pop-up windows, even if I have a pop-up blocker enabled.

    The problem with these pop-up windows, it is that they have the option close as for other windows of Firefox for Mac.

    This results in the ToolTip remains open and the only way I can get rid of it is to stop completely from Firefox.

    Any help will be appreciated.

    Hello

    Maybe you could try the keyboard shortcut command + W (close the current tab) or command + SHIFT + W (close the current window) when the pop-up window appears in the foreground.

  • I have an oval window on my desktop (Mac), which sets out everything I do and he's also very strong! Malware? Adware?

    I have an oval window on my desktop (Mac), which sets out everything I do and he's also very strong! Malware? Adware?

    If it looks like something like this, you have probably enabled VoiceOver.

  • install windows 10 on old mac

    Now that bootcamp will not let you install windows on an old Mac 10, can it be done without bootcamp?

    You can try to install one of the programs of virtualization; Parallels Desktop, VMWare Fusion and VirtualBox.

  • What is the best strategy to migrate data from Windows to one Mac to another? I use Parallels Desktop to run Windows on my current Mac but want to use Bootcamp on my new.

    What is the best strategy to migrate data from Windows to one Mac to another? I use Parallels Desktop to run Windows on my current Mac but want to use Bootcamp on my new.

    If it is only the data (not apps) I use Dropbox. It turned out to be the best way to move things between the side Mac and the bootcamped Windows of my iMac side. I don't see why it would not work to move data from a virtual machine installation of Win to a BootCamp installation.

  • Windows Remote Desktop for Mac 2.01 - buttons Invisible Radio

    I have a MacBook Pro (Intel Core i5 2.53 Ghz to) that I use to connect to a desktop computer Dell Windows XP Professional SP3 Windows Remote Desktop for Mac 2.01.  Connecting to XP from my Mac desktop, everything seems to work properly.  Looking more closely however, radio buttons do not appear on the applications that use them.  This does not work with just a single application, but in all areas with applications and web browsers in the side of XP displaying my Mac desktop.  This problem can also be reproduced with laptops and desktop computers running XP SP3.

    If someone has encountered this problem or a solution?

    Hello Jason A_12,.

    Remote Desktop is supported by TechNet Forum.

    Click on the link below to ask your question on TechNet. http://social.technet.Microsoft.com/forums/en-us/winserverTS/threads

    Thank you

    Marilyn

  • Can I install Windows Journal on a Mac computer?

    Can I install Windows Journal on a Mac computer?  I currently use Windows Journal to teach by posting paper documents on a smart board.  The administration requires me to switch to a Mac, but I don't want to lose the Journal and its capabilities.  I will not need to use a pen on the computer, I use the stylus on the smart board.  I would buy the windows software of newspaper and try to download on a Mac.  Can I order windows software log?

    You have two problems here:

    1. Programs Windows cannot be installed on a Mac.
    2. Windows Journal is not available as a separate program.

    If the Administration allows it, you can install Windows on a Mac with Mac OS X. Then, there are two ways to access the applications Windows explained here:

    http://store.Apple.com/UK/browse/guide/Windows

    You can buy a copy of Windows to do this.

  • How can I install my Windows 7 on a mac with all my files intact?

    I'm getting a Macbook Pro and I would like to install it on Windows 7 via Bootcamp. I have a few questions:


    1.) without having to buy a new Windows 7, can I use my current and transfer it on my Mac, with all my files with it?

    2.) If Yes, how can I make a copy of my Windows 7? What do I have to type in my license of something? Or open a file?


    I'm getting a Macbook Pro and I would like to install it on Windows 7 via Bootcamp. I have a few questions:


    1.) without having to buy a new Windows 7, can I use my current and transfer it on my Mac, with all my files with it?
    1 license, 1 computer. If your current copy of Windows 7 is installed on another computer, you cannot transfer it to your Mac unless that remove you it from the current computer. There are also a full commercial license.

    2.) If Yes, how can I make a copy of my Windows 7? What do I have to type in my license of something? Or open a file?
    Learn how to:

    See:

    also:


    The above mentions Windows 8, but the same principles apply to Windows 7, especially with the new MacBook Pro, who do not have optical drives.



  • I installed windows 7 on a mac with boot camp and then used parallels to create a virtual machine to run windows inside Mac os10.6. Now he says I need to activate windows again, but he said I need a new activation key. Any ideas would be appreciated

    I installed windows 7 on a mac with boot camp and then used parallels to create a virtual machine to run windows inside Mac os10.6.  Now he says I need to activate windows again, but he said I need a new activation key.  Any ideas would be appreciated

    Yes, you must purchase a full license for the second installation of Windows 7 product key.  1 activation allows only one Windows 7 product key.  Apparently, you now have a second facility that requires a second product key. Carey Frisch

  • A question on getting Windows 7 on a Mac? In addition, the Office?

    My old computer is an Asus. I just got a MacBook Air on Sunday. I got it and it's been great. I wanted to run some of my games and others to buy Windows 7 and Microsoft Office for the school. However, I have both on my old computer.

    (1) is it possible can I transfer from my old computer to my new computer?
    (2) if so, how?
    (3) otherwise, should I get? My old computer had a Windows anytime upgrade, and I don't know what that means. He was also Microsoft Office. How can I get Windows 7 on my Mac? If I have to buy the retail package, or the Windows 7 Key Code thing would work? I don't know how it works, so could you help me?
    ANSWER: My mother has been bought. It came pre-installed.

    You will need to use a full commercial license.  An upgrade license or an OEM license will not work.  If the Windows 7 product is preinstalled on the computer, it probably has an OEM license, so no, it cannot be transferred.

    With respect to the office, how did you install it?  Is it preinstalled?

  • Windows 8 on a Mac - 32-bit or 64-bit

    I have 2 Macs and I want to install Win 8 on both, I've had Parallels in a computer and Boot Camp on the second.

    I am about to purchase 2 licenses to win 8 and I am aware that I have to buy the System Builder version, but I don't know if I have to buy 32 or 64 bit

    I have 2 Macs and I want to install Win 8 on both, I've had Parallels in a computer and Boot Camp on the second.

    I am about to purchase 2 licenses to win 8 and I am aware that I have to buy the System Builder version, but I don't know if I have to buy 32 or 64 bit

    How old are your Mac?

    Find out what version and architecture of Windows is supported on the following link:

    http://support.Apple.com/kb/HT5634?viewlocale=en_US

    Boot Camp requirements by Mac model

    Select your Mac computer type from the list below to find out what version of Boot Camp and Windows are supported by your Mac. If you don't know what Mac model you have, follow the steps later in this article.

    Notes

    • '4' or '5' in the tables indicates the version of Boot Camp that is supported on your Mac. The Boot Camp version determines which version of Windows works with your Mac.
    • "DVD" indicates that the drivers are installed from the DVD that came with your computer to install Mac OS X.
    • "BCA" indicates that Boot Camp drivers are automatically downloaded as part of the Boot Camp Assistant in OS X, for the 2013 models or later Mac computers.

Maybe you are looking for