[JS SUI] How to set the background of the window?

Hello

I want to add the background image to Window (SUI) and add another control that on this subject.

Is this possible?

I found "window.orientation =" stack"", but I can't change the location of the control.

Any ideas?

Thank you.

var w = new Window ("dialog", "test");
w.orientation = 'stack';

var image = File(Folder.desktop + "/test.jpg");
w.add("image", undefined, image);

var edit = w.add("edittext", undefined, "");
edit.characters = 10; 

//edit.bound = [0,0,100,100]; //The size can be changed, but location can not be changed. 
//edit.location = [100,100];
//edit.preferredSize = [100,100];

w.show ();

I think that in your original post, the limits (in the commentary part of the code) has failed because you wrote settings change. destination = [0,0,100,100]; rather than change it. bounds =...

I find evil at ease to avoid ScriptUI autolayout all, but the following should work to place text in the desired position:

var w = new Window("dialog", "test");

// add a group with 2 elements:
var g = w.add("group");
var im = g.add("image");
var et = g.add("edittext");

im.image = ScriptUI.newImage(File(Folder.desktop.absoluteURI + "/IMAGES/index.png"));

// set location and size for everything
g.location = [0,0];
g.size = im.size = im.image.size;
im.location = [0,0];

et.size = [50, 20];
et.location = [25, 15];

w.show ();

Xavier

Edit: as an alternative to the definition of the limits once and for all, you can redefine the purpose of layout for the Group:

g.layout ={
    layout : function(){
        im.size = im.image.size;
        im.location = [0,0];
        et.size = [50, 20];
        et.location = [25, 15];

        g.preferredSize = im.image.size;
        },
    };
g.layout.resize = g.layout.layout;

.. something like that.

Tags: InDesign

Similar Questions

  • How to set the background Transparent

    Hi all

    I'm very new to blackberry development, can someone tell me how to set the background transparent.

    Thank you

    Kishore P.

    Use this code:
    VFM VerticalFieldManager = new VerticalFieldManager () {}
    //...
    }
    vfm.setBackground (BackgroundFactory.createSolidTransparentBackground (Color.COLOR_YOU_LIKE, 0));

  • How can set the background color of the status bar?

    Quote from the old forum:

    Comments: comments
    How can set the background color of the status bar?
    Posted the: July 17, 2008 02:56
     
    How can set the background color of the status bar?
    Using this code for the status bar:
    LabelField statusField = new LabelField ("Good Morning", LabelField.USE_ALL_WIDTH |) LabelField.NON_FOCUSABLE | LabelField.HCENTER)
    {
    int _backgroundColour = Color.LIGHTGREEN;
    public void paint (Graphics g)
    {
    g.setBackgroundColor (Color.RED);
    g.Clear ();
    Super.Paint (g);
    }
    };

    Font defaultfont = Font.getDefault ();
    Police smallfont = defaultfont.derive (Font.PLAIN, 12);

    statusField.setFont (smallfont);
    setStatus (statusField);

    When I ran the code you have above, my status background color was red.  Is not what you see?  If so, please provide the BlackBerry model and software version that you are testing.  You can find this under Options.

    Or if you try to do something else, please provide details.

    I tested this in the BlackBerry Simulator included with version 4.5.0 BlackBerry JDE (4.5.0.44).

    To do this in version 4.1, first call getColor and save the current color.  Then call setColor, setting the color to the color you want to use for the background.  After this call call fillRect, starting with 0, 0 and go to the size of the field (use this.getWidth () and this.getHeight () to get this).  This must fill in the field with your specified color.

    To allow the drawing of the default content of the field call setColor once again, passing in the original color, then call super.paint.

  • How to set the color for background ChoiceBox point to ChoiceBox with css?

    How to set the color for background ChoiceBox point to ChoiceBox with css?

    I need to change the backgound color list items.

    I tried with the following code, but it's not help to:

    {.context-menu .choice-box

    -fx-background-color: Red;

    }

    .choice-box .menu-item {}

    -fx-background-color: red;

    }

    In Java 8, either of your selectors should work.

    In Java 7 (JavaFX 2.2), you need of the following workaround:

    #choice-box-menu-item {
         -fx-background-color: red ;
    }
    
  • How to set the stage (or the background in the stadium?) to be transparent?

    How to set the stage (or the background in the stadium?) to be transparent?

    Thank you

    Gary

    Select the scene.

    Color sample

    Then set the Alpha slider to 0.

    .

    Darrell

  • How to set the background color of a page_item?

    I was pasting "background-color: #5CD65C" in a number of places, like the 'attributes of the HTML table cells' under the label and the tabs of the item, but get no results. Can someone tell me how to set the background color of a cell, please?

    Hi Doug,.
    One method is to add a style to your header html in page attributes, if you add the below css styling and the change of the name of the item page (#P2_FIRST_NAME) to your he should style correctly:

    Thank you

    Paul

  • How to set the background image in the window title?

    Hello

    I am a beginner in flex. I use Flex 4.

    Can someone give me some advice on how to set the background image in the title window?

    Is it possible to do?

    Thank you.

    Hello

    Check the code in the example below


    http://ns.Adobe.com/MXML/2009.
    xmlns:s = "library://ns.adobe.com/flex/spark".
    xmlns:MX = "library://ns.adobe.com/flex/mx" minWidth = "955" = "600" minHeight >
       
           
       

       
    @namespace s "library://ns.adobe.com/flex/spark";
    @namespace mx "library://ns.adobe.com/flex/mx";

    s | {BorderContainer
    background - image: embed(source="image/wheres_the_green_rez.jpg");
    background-image-fill-mode: clip;
    }


       
           
       

    Kind regards

    Anitha

  • How to set the number of e-mail messages that are stored on my iPhone

    How to set the number of e-mail messages that are stored on my iPhone – so when I don't have a network connection I can see a 'large' number of messages in my Inbox etc.

    This is series is not defined in the world

    You must go to settings-> mail, contacts, and calendars and check the settings of your e-mail provider offers in this area

  • How to set the time that my screen stays on?

    How to set the time that my screen lights up.  I have an iPod Touch 6?

    Settings > general > auto-lock

  • How to set the default android home page.

    How to set the home page in the latest browser of firefox for android?

    Hello:

    Unfortunately you can not remove the top sites home page but you can pin a site, remove a site from unpin it and change the url of a pinned site.

    Please read this article for instructions.

    I hope this helps!

  • How to set the time between slides in a slideshow (iPhoto, el capitan)

    How to set the time to say - 5 seconds or 20 seconds - between slide show photos in iPhoto. I use el capitan.

    See the Settings button at the bottom right of the toolbar (at the bottom of the slide show). Click on it and you have a small window with two tabes, refers to all the slides, the other to the selected slide. You can make your choice

  • Satellite C660 - how to set the focus of the webcam?

    Hello

    Just bought this laptop, the built-in webcam looks very blurry when I use Skype. Does anyone know how to set the focus to the subject?

    See you soon
    Jules

    Hello

    to be honest, I have no idea on your model of lap... Try to update driver webcamd and play with Skype video settings.

  • How to set the date and time on my HP Officejet pro 8600 more?

    How to set the date and time on my HP officejet pro 8600 more?  It just on a printed journal Jan-oo-oo fax shows 00:00 AM.  There are no instructions on how to change this.  I need proof that I sent a fax to a certain date and time.  Help, please.  Thank you

    Hello

    Below are the steps to set the Date and time for your device:

    1. On the Control Panel, press the right arrow key ( ), press Setup ( ).

  • How to set the output meter channel to generate a signal pulse using DAQ6008

    Hello there I am generating a pulse signal of 100 Hz and a duty of 20% of the 6008 data acquisition cycle using visual studio 2013. I have code that needs to generate this but I'm not sure on how to set the channel output meter. When I run this NI MMAX and my vb error code indicates that the physical channel is not supported. I am a user of data acquisition were first and would appreciate any help offered.

    If you look at the USB-6008/6009 User Guide and specifications, you will see that the counter in these devices cannot rely as edges of entry. It cannot generate a pulse.

    Lynn

  • 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.

Maybe you are looking for

  • Widows XP computer since 2001. Fullscreen error. ANSWER as soon as possible please.

    I have a Windows XP computer since 2001. Recently, I had a problem with the computer, but it was fixed in the shop. When the computer had been completely deleted and re-uploaded with a few new such application has Virus protection. When I press or se

  • Cannot install toolbars-"error 2738".

    Original title: I am facing error 2738 when uninstalling a toolbar. Solutions mentioned in this forum doesn't solve the problem. Other necessary methods. I use windows vista Home basic 32 bit OS. I am facing error 2738 when uninstalling a toolbar. In

  • VPN at the request of iOS to the NSA 220

    Can I connect an iPhone or an iPad to a SonicWall NSA 220 with SSL VPN on demand and detection of trusted network? Read the Notes version and Guides on the link below, I think I won't be able to do so in part because the NSA 220 does not support the

  • E7240/E7440 - Intel Management Engine drivers Hangs Windows 7 Setup

    Hi all Wonder if anyone else has problems with installing Windows crashing with the Intel management engine Drivers injected directly into the WIM image? The error message that appears when the installation says "Windows cannot configure one or more

  • No HDMI Audio, could not play the test tone, cannot change the default playback device

    Hello, I have real trouble with my HP Pavilion dv6-2160us experience (with the i3 - 330 M, no dedicated graphics card) Windows 7-64 bit, SP1 PC and I would be happy to help. I created a new thread because, despite the fact that many other people have