Record the location and size of the pallette tabs

I create a new palette with tabs and I would like to save the changes made by the user for the position and size, so they can be applied at the next opening of bridge.  Instead of the palette by tabs always open in the bottom right, for example, paletteColumn [law, low] and with a fixed width, I want to open up to the size and location in their last session of the user.  If the user drags the palette tabs to another location or drag the width, I want to read to the end and write it in a temporary file where it will be read at the next startup.

It seems that I should be able to access the properties of a tab of the palette using app.document.palettes [index], but I can't get anything useful to come back.

Thank you.

Interesting, it might be easier to tell the user to create a new workspace

It seems that the location (row, column) cannot be retrieved for some reason any?

Also another bug in Bridge CS6, it will crash if you close the palette.

Here is a test code, I used...

//#target bridge
test();
function test(){
 var SP = new TabbedPalette( app.document, "Test", "testTab", "script", "left", "top");
 SP.content.onResize = function(){
  var b = this.bounds;
  pnl.bounds = b;
  this.layout.resize(true);
  SP.content.layout.layout(true);
 }
 var pnl = SP.content.add("panel", undefined , "");
 pnl.alignChildren = ["center", "fill"];
 var mainBtnGp = pnl.add("group");
 mainBtnGp.orientation = "column";

 var titleGp = mainBtnGp.add("group");
 titleGp.alignment ="column";
 var title = titleGp.add("statictext", undefined, "Test Panel");
 var g = title.graphics;
 g.font = ScriptUI.newFont ("Arial", 20);
    var gp90 = mainBtnGp.add("group");
    var bnds = gp90.add('button',undefined,'Bounds');
 var gp110 = mainBtnGp.add("group");
    gp110.alignment ="column";
    var dl = [ "Upper Left","Upper Right","Center","Lower Left", "Lower Right","Remove Palette"];
 ulBtn = gp110.add("dropdownlist", undefined, dl);
    ulBtn.selection=0;
    bnds.onClick=function(){
      alert("Panel Bounds \r" +SP.content.bounds.toString() +
    "\rTitle = " +SP.title + "\rID = " +SP.id + "\rRow = " + SP.paletteRow +"\rColumn = " + SP.paletteColumn);
        }
 ulBtn.onChange = function(){
        switch(this.selection.index){
  case 0 :SP.setLocation("left", "top"); break;
        case 1 :SP.setLocation("right", "top");break;
        case 2 : SP.setLocation("center", "middle");break;
        case 3 : SP.setLocation("left", "bottom");break;
        case 4 : SP.setLocation("right", "bottom");break;
        case 5 : SP.remove();break;
        default : break;
        }
 }
 SP.content.layout.layout(true);
}

Tags: Bridge

Similar Questions

  • Enter the location and size of box guide

    I know how to get the location and size of a selected object.

    var artWidth = artGroup.width;
    var artHeight =artGroup.height;
    var artLeftPos = artGroup.pos[0];
    var artTopPos = artGroup.pos[1];
    

    but all my models have only one box and that the box is always centered on the artboard, but its position is upwards or downwards to the Center.  Is it possible to check if the box has been changed to guides on the view menu. View > Guides > Guides to do, it of what I'm talking about after removing the color of background and outline of your object to ensure that it can be used for sizing and position of your work, but do not print.  I need something like below who will go through all elements of the path until the element is a guide is so it makes the variable myGuideBox for me to grasp its size and position so that I can double check it against what the user initially selected.

    I read through the view of the object and the site http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/illustrator/sdk/CC2014/Illustrator% 20Scripting % 20Reference % 20-% 20... but I can't find anything to say whether or not an object is a guide.  If it is not possible, this means that I'll have to find another option, and I'm open to ideas.

    for (i=0;i<docRef.pathItems.length;i++)
    {
         if (doc.pathItems[i].guide == true);
        {
             var myGuideBox = doc.pathitems[i];
    }//end if
    }//end for
    

    Thanks in advance for any ideas or pointers that you can give me.

    Zantcor wrote:

    n ' have only one box of guide

    -go through all the elements path until the only element that is a guide is located then it makes the variable myGuideBox for me to grasp its size and position

    If you say that there is only 1 guide in the file, then maybe the following simple example will work:

    function getGuideBox() {
        app.activeDocument.selection = false;
        var doc = app.activeDocument;
        var p = doc.pageItems;
        for (var i = 0, l = p.length; i < l; i++) {
            var pID = p[i];
            if (pID.guides == true) {
                pID.locked = false;
                pID.selected = true;
            }
        }
        var guideBox = doc.selection[0];
        var wNum = guideBox.width;
        var hNum = guideBox.height;
        var xNum = guideBox.position[0];
        var yNum = guideBox.position[1];
        alert("GuideBox Data:\nWidth: "+wNum+"\nHeight: "+hNum+"\nX Position: "+xNum+"\nY Position: "+yNum);
    }
    getGuideBox();
    

    I hope it's useful.

  • Location and size of ESX 3.5 swap file host

    Hello

    Where is the swap ESX 3.5 file host located, what size and how do I know how is used? I think does not occupy disk space.

    Thank you very much

    Welcoem to the communities you - are you referring to the by the vmkernel VM or swap file pagefile - if you are referring to the Service Console by vmvmkernel swap you other posters answer is correct - if you make reference to the Console's Service swap file is created and defined during the installation of ESX and a separate partition is created the

  • How to record the individual tabs in shell dynamic oracle

    Hello
    When I press save button in a tab on my adf application other files opened in other open tabs are affected and validated by this button!
    I want to save the content of the active tab only

    Published by: 996170 on March 26, 2013 02:05

    Hello

    If the record button is a specific to this tab, you can set immediately = true property of button and if global button Save, then he would have a different approach to avoid the postings of the other tabs.

  • Location and size of boot camp

    I'm on a 2015 15 "MacBook Pro with dedicated smart running El Capitan graphics card. I run software that requires Windows and seeks to implement the BootCamp to run Windows for the handful of times a month I need to use the software. My hard drive is a 500gig SSD, but I have only about 80 free concerts. I moved my iTunes and pictures libraries on a Thunderbolt 2 TB external drive. I have 1 TB free on this disk. My options are 1) using most of my remaining space internal to the BootCamp partition SSD, 2) using the external drive Thunderbolt or 3) a USB 3.0 128 GB Thumb Drive for the Boot Camp partition.

    Does anyone have suggestions about where would be the best place to put this partition? Or I'd better watch the virtual machines running off the external drive?

    Thank you.

    My recommendation is to 100 GB minimum for Windows and your Windows data. More if you have a lot of data. The Boot Camp partition must be on your internal drive. Read and follow the instructions of Boot Camp.

    A virtual machine is running.

  • Location of the controls and indicators on the pallets

    Is it possible to know the location of control and indicator on the pallets of a pre-designed vi?

    THX

    If you ask "Given control over the façade of an existing VI, how to find the range, in which it is originally found?"

    There is no direct way.

    If the controls have been customized, then there is no palette.

    Ben

  • Why am I suddenly the following error message: "the specified location is reserved by the operating system and is not allowed. Please choose another location. "I've been recording all night and I have not changed the settings.

    Why am I suddenly the following error message: "the specified location is reserved by the operating system and is not allowed. Please choose another location. "I've been recording all night and I have not changed the settings.

    toml12632875 wrote:

    I've been recording all night and I have not changed the settings.

    You have completed a disc to its ability, by chance?

  • Location and the size of area spot within a compressed file

    Hi all

    I'm working on an authorware program in which I want to use the size of years of a hotspot location clicked to draw a rectangle. Finally, I would like to be able to change the size and position of a point of interest, and when they are packed, the rectangle must belong to the new position of the hotspot, with the new size. So far, I've been successful in a file not packed with:

    GetIconProperty (@Title; #awSizeX))

    GetIconProperty (@Title; #awSizeY))

    GetIconProperty (@Title; #awLocationX)

    GetIconProperty (@Title; #awLocationY)

    where the title is the title of the clicked hotspot. So far so good... BUT I learned the hard way that GetIconProperty() does not work in a bundled file authorware (next time I will first read the help section better!). My question: How can I get the same information in a packaged authorware file?


    I was watching the GetSpriteProperty() function, which should work in a bundled file. However, the hot spots aren't sprites, and I do not know what spriteproperties should I use for the location and the size of the area reactive (#awSizeX, #awSizeY, #awLocationY and #awLocationX do not work). In addition, GetPostPoint provides the position of the upper left pixel of the hotspot, but I need separate the values X and Y position of the reach to be able to use the Box() function to draw the rectangle. And I need the hotspot as well. Finally, PositionY@Title and PositionX@Title do not work for my hot spots (the value is always 0 and does not change when you click on the hot spots).


    I could solve the problem by making all the position values variables and the values of the size of all the hot spots, but then I wouldn't be able to change the position and size of the hot spot by dragging and by changing the rectangle accordingly.

    I'd be more than happy to hear if anyone has a solution for me.

    Thank you!

    OK, after playing with the functions GetPostPoint and GetPostSize, I managed to do something that does what I want in a bundled file.

    My solution:

    posBox: = GetPostPoint (@Title; #response) - returns a list with [x, y] position

    sizeBox: = GetPostSize (@Title; #response) - returns a list with [width, height] size

    Box(pensizeBox;posBox[1];posBox[2];posBox[1]+sizeBox[1];posBox[2]+sizeBox[2])

    Hope that helps others to identical or similar problems!

  • How to set the position and size of the façade using the FPRunTimePosRunCustom method in a c# application?

    How to set the position and size of the façade using the FPRunTimePosRunCustom method in a c# application?

    I found a solution! -Set the size and position of the façade with the help of the

    File > VI properties > window running Position (in category list) > custom (in position of menu drop-down).

    then just accept the current position and size (leave the boxes checked) or set values you want directly (uncheck the boxes and fill in the numbers), or physically position and size the façade and use, the "set to current location" button and press "set size" current All that is easier for you.

    OK so it does not make use of the method VI Methods (Active X) FPRunTimePosRunCustom ([Position], [Size]) but if labview want to make him difficult to use then other means must be found.

  • How can I save the page settings in the Notepad. I wish to record the size of A4 paper but just default to 'Letter' every time that I re - open Notepad.

    I can't save the page settings in the Notepad. I wish to record the size of A4 paper but just default to 'Letter' every time that I re - open Notepad.

    Hello

    Included with Windows Notepad text editor allows you to configure the layout including headers, footers and margins. These options are normally not saved between sessions, but with this Notepad tweak can be done to save the changes. Please try this method and answer us.

    Open your registry database and find or create the key below.

    A. go to start and regedit and press ENTER.

    B. HKEY_CURRENT_USER\Software\Microsoft\Notepad

    C. create a new DWORD value called "fSavePageSettings" and there the value '1' to save the settings page.
    D. create a new DWORD value called "fSaveWindowPositions" and it "1" to record the position of the window.
    E. restart Windows for the change to take effect.

    To do: Important this section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base:
    322756 (http://support.microsoft.com/kb/322756/ )
    How to back up and restore the registry in Windows

  • Font and size: how to change the default (for outgoing e-mail)?

    I'm going to 'Write', I put it in the address, etc., and when I start typing my message, the font size is tiny, the font is Times, although sub
    Format - fonts, I see Helvetica and size is extra-large. Sometimes using "fixed width" gives me a better font size. I then choose a font of
    "Choose a font", and I'm all set. However, I have to go through the same procedure for each e-mail! Help!

    Try changing the settings in Tools - Options - display - (tab) - (article) fonts & colors - formatting, enter a default font and the font size to use when NO other formatting is specified.
    Now press the button on the same line,
    in the next window, make sure that the police and & the font size you want entered in the selection boxes.
    Under the control of the police - the two boxes ticked? Your choice.

  • Where can I go to adjust the size of the police of the headers, tabs, toolbars? Messages, pages, on the screen appears normal and can be adjusted using ctrl +-.

    Run Firefox 28.0. Just updated, which did not help. On Firefox and Thunderbird font size increased to headers, tabs, toolbars, drop-down menus, etc. What's on the display appears normal and can be adjusted by using the CTRL +. Has no effect on the toolbars, headers, etc. My resolution is to the max, small icons, the size of the text to 100%.

    You can set the layout.css.devPixelsPerPx pref on the topic: config page on 1.0 or Windows 8 to 1.25 and if necessary adjust layout.css.devPixelsPerPx from 1.0 to 0.1 or 0.05 steps (1.1 or 0.9) do the icons to display properly.

    See also:

    An extension allows you to adjust the size of the text in the user interface and zoom the page in the browser window.

    You can watch this extension to adjust the font size for the user interface.

    You can watch the Default FullZoom Level or NoScript extension if the web pages need to be adjusted after the change of layout.css.devPixelsPerPx.

  • I can't bid on firefox or explorer. I place the cursor in the quote box, and it will not record the numbers. Can someone please help?

    I can't bid on firefox or explorer. I place the cursor in the quote box, and it will not only record the numbers. Can anyone help please thanks

    Problem solved. My husband came and noticed that the number lock has been deactivated. I can't thank you enough for your help. Hope my solution helps someone else with the same problem.

  • Why is my Firefox background rose after update and the pallets in the options contain ONLY shades of pink?

    After the update by 12.0, my browser changed to rose. Try to change the colors of return (after reading the forum posts), I discovered that the pallets were entirely pink.

    I start Firefox in safe mode and the rose disappeared, suggesting that one of my modules was to blame, but after disabling all the one at a time (except for the theme by default.. .the one I have) the rose remained.

    Have you tried disabling hardware acceleration?

    • Tools > Options > advanced > General > Browsing: "use hardware acceleration when available.
  • I have the time to default iPhone 4 iOS 7.1.2 iPhone App not updated since the last 3 days and also checked all the settings for location and also set as new iPhone always present problem... Please try to fix... Thanx

    I have the time to default iPhone 4 iOS 7.1.2 iPhone App not updated since the last 3 days and also checked all the settings for location and also set as new iPhone always present problem... Please try to fix... Thanx

    Turn off your device and turn it on again. If this does not help, sign out of your account and reconnect.

    In addition, you can try to reset your settings.

    • Press and hold the sleep/wake button
    • Press and hold the Home button
    • Press and hold both buttons until the display turns off and on again with the Apple logo on the subject.

    Alternatively, you can go to settings - general - reset - Reset all settings

Maybe you are looking for