How to resize controls to get the width

Hi guys,.

I will try to find a way to not hard code the width/height of the controls, checked a way to use 'USE_ALL_WIDTH' of bb4, but the DockLayout method, but the solution in this thread will not work, because I can not find DockLayoutProperties:

is there properties such as USE_ALL_WIDTH or USE_ALL_HEIGHT

So, how do you guys do when you need a control to get all the width of the screen size?

Hello

Suppose you want to give the width of button do as below:

Container {
        layout: DockLayout {
        }
        Button {
            id: submitButton
            text: "Submit"
            onClicked: {
            }

            horizontalAlignment: HorizontalAlignment.Fill
            verticalAlignment: VerticalAlignment.Fill

        }
    }

Do not include horizontalAlignment: HorizontalAlignment.Fill inside layoutproperty.

Thank you

Tags: BlackBerry Developers

Similar Questions

  • How do I get the width and height of an external image

    Hello

    lets say I want to get the width and/or height of this external image (it could also be an external file on my hard drive): http://www.icatcher.com/wp-content/uploads/2013/01/Adobe.PNG

    I create a button and add an onClick function that says:

    var externalImageWidth = ???
    alert(externalImageWidth);
    

    How can I do (so to speak dynamically?)  without the addition of the image itself to my library or put it on the stage?

    All my attempts said 'indefinite' or '0' or they simply do not work.

    Thanks in advance!

    You can try the following (assuming that there is a dummy container with id mydiv = div),

    var img = new Image();

    IMG. OnLoad = function() {}

    SYM. $("mondiv") .attr ("width", this.width) .attr ("height", this.height) .append (this);

    };

    IMG. SRC = "http://www.icatcher.com/wp-content/uploads/2013/01/Adobe.png";

    Modify the code according to your need for the selection of the container element.

    DIA-

  • How to get the width and height of Flex Mobile view?

    Hello

    The following instructions can get the width and height of the current Flex app:

    var request: UIComponent = FlexGlobals.topLevelApplication as UIComponent;

    trace (application. Width);

    trace (application. Height);

    But I don't know how to get the width and height of mobile display Flex current (i.e. the content size excludes bar action and the Navigation bar). Why the "this.width" always returns 0?

    Thank you!

    Looks like you're running in this bug: https://bugs.adobe.com/jira/browse/SDK-30070

  • How do I get the width of the table?

    Hello

    pls someone tell me, how do I get the width of the table?

    Thank you

    Vijay

    Try,

    InterfacePtr tableGeometry (tableModel, UseDefaultIID());

    PMReal tableWidth = tableGeometry-> GetColWidths (0,-> GetTotalCols () .count tableModel);

  • How can I get the width of a loaded swf scene?

    Is it possible to get the real of a loaded swf stageWidth?

    The problem comes when the loaded swf file has some items off the stage. In this case content.width becomes bigger then the scene.

    My code looks like this:

    var request: URLRequest = new URLRequest (file.url);

    var loader: Loader = new Loader();

    Loader.Load (request);

    loader.contentLoaderInfo.addEventListener (Event.INIT, CaseTailleAuto);

    loader.contentLoaderInfo.addEventListener (Event.COMPLETE, addImg);

    private void checkSize(e:Event) {}


    That's where I need to see the width of my loaded swf

    trace (e.Target.Content.Width);

    }

    private void addImg(e:Event) {}

    trace ("complete");

    }

    Thank you

    Andrei

    I don't think you can get the width of the stage of the loaded file, unless you assign it as a constant somewhere in the file.  The loaded file loses its stage when it is loaded into another swf

  • How do I get the width of a numeric field when running

    Hi, everyone :D
    There is a built-in function that allow me to get the width of a numeric field when running? The SRW bulit in only has the SWR. Built-in GET_PAGE_NUM. is there something like the Get_item_property of report forms?

    Thank you

    Published by: user12422762 on 07/ene/2010 14:16

    Published by: user12422762 on 07/ene/2010 14:30

    Published by: user12422762 on ene / 08/2010 04:40

    Published by: user12422762 on ene / 08/2010 04:50

    Why did you adjust the mask format?, just use one that is long enough to fit the longest value. use something like "FM999G999G999G999", the FM will remove the leading spaces.

  • Get the width/height of the current image / information of KING of user input

    Hello

    I have two problems:

    First of all:

    Y at - it an option to get the width and height of the image to use for calculations or set a return on investment for the right settings?

    Second (more complicated):

    I have used Labview 8.5 custom interface (see the interface.jpg attachment).

    I am trying to get the return on investment of the Interface and use it in my app Builder of Vision, but I don't see the return on investment or its size or position or something...

    Is it possible to get this information from the Interface?

    Information:

    I use Vision Builder 2009 SP1, LabVIEW 8.5

    Thanks for your replies!

    Hello

    I missed that when I tested it... the display image control must have been larger than the size of the image and the property node returned the value that I expected.

    A restriction of the VI to Interface custom that you create in LabVIEW, is that it cannot have any dependencies (call any subgroup screws), other than the methods and the nodes property of the objects you put on. Therefore, I can't just call IMAQ GetImageSize her. So it does not seem possible at this point for the VI of custom Interface return the size of the image.

    The solution, at this stage, to get the size of the image of the Interior Vision Builder AI, is to use a step in LabVIEW Run, calling a simple VI that takes an image as input, called IMAQ GetImageSize and return res X and Y.

    Note that for purposes of distribution, when you call a VI using a LabVIEW execution step, you must save it as a source distribution in a Bachelor's degree in LAW and you must redistribute this llb with your inspection. See using setup step run LabVIEW for more details.

    Sorry there is no better way to do this now.

    Best regards

    Christophe

  • Not the 'Volume Control', I get the message "there are no available active mixer device." ____

    I went through the troubleshooting help utility and when I opened 'Volume Control' I get the message "there no activemixerdevices available". I tried different things, but still no sound can u tell me how to recover the volume control because when I click on it says "there no activemixerdevices available". and when I go to control panel, sounds and audio devices it says no device and grayed out. Please HELP NEED HELP URGENT

    Update:

    I mixer by updating the driver but when I go to the sound and the device it says "No. Audio Device" in the volume tab my speakers work perfectly with my mp3

    If not, do that, if the above does not work:

    Insert your XP CD in your drive. Do not start. Then:

    Start > run > type in msconfig > OK or Enter > click on extract files > then file to extract = sndvol32.exe > then tap your CD-ROM drive as the source > extract to c:\windows\system32 > can Extraxt > crush is required > if it does not re-post.

    See you soon,.

    Jerry

  • Get the width of the dynamic text boxes containing different letters

    I have boxes of dynamic text next to each other, each showing a letter and the creation of a Word, any letter English ABC. Given that some letters are wider, how could I get the width of each letter to figure out spacing between them?

    Thank you!!

    You can use the textWidth of textfield property to get the width of the text inside.

  • Get the width of the BlobDomain image as a transitional attribute in a ViewObject problem

    Hi, I need your help. What I want to do is to get the width or the
    height of the image as a maximum limit, but I get a
    java.lang.NullPointerException.

    I create a table like this

    CREATE TABLE IMAGE)
    ACTIVATE THE ID NUMBER NOT NULL,
    IMAGE BLOB,
    CONSTRAINT IMAGEN_PK PRIMARY KEY (ID)
    )

    I create business for this table components and in the view object I
    Create a transient type Boundary String attribute. In the java
    ImageViewRowImpl I replace the accessor method to get the width of the class
    or the height of the image as a maximum limit.

    public String getBoundary() {}
    try {}
    InputStream is = getImage1 () .getBinaryStream ();
    BufferedImage bi = ImageIO.read (is);
    width int = bi.getWidth ();
    height int = bi.getHeight ();
    if(Width>heigth)
    Return Integer.toString (width);
    on the other
    Return Integer.toString (heigth);
    } catch (IOException e) {}
    e.printStackTrace ();
    Returns a null value.
    }
    }

    The problem is when I run the application module cause I get a
    java.lang.NullPointerException when the method is call. It comes to stacktrace:

    oracle.jbo.AttrValException: Houston-27019: No. is ha resolver el Método could get para el atributo 'Limit' in ImageView1.
    at oracle.jbo.server.ViewRowImpl.getAttribute(ViewRowImpl.java:883)
    at oracle.jbo.uicli.binding.JUCtrlValueBinding.internalGetAttributeValueFromRow(JUCtrlValueBinding.java:1157)
    at oracle.jbo.uicli.binding.JUCtrlValueBinding.getAttributeFromRow(JUCtrlValueBinding.java:751)
    at oracle.jbo.uicli.binding.JUCtrlValueBinding.getAttributeFromRow(JUCtrlValueBinding.java:779)
    at oracle.jbo.uicli.binding.JUCtrlAttrsBinding.updateValuesFromRow(JUCtrlAttrsBinding.java:145)
    at oracle.jbo.uicli.binding.JUCtrlAttrsBinding.refreshControl(JUCtrlAttrsBinding.java:245)
    at oracle.jbo.jbotester.BindingAdapter.refresh(BindingAdapter.java:69)
    at oracle.jbo.jbotester.panel.CardPanel.refreshAll(CardPanel.java:128)
    at oracle.jbo.jbotester.panel.RowSetPanel.refreshAll(RowSetPanel.java:206)
    at oracle.jbo.jbotester.panel.RowSetPanel.showCard(RowSetPanel.java:236)
    at oracle.jbo.jbotester.panel.RowSetPanel.setIterator(RowSetPanel.java:105)
    at oracle.jbo.jbotester.panel.BindingPanel.setBindingContext(BindingPanel.java:118)
    to oracle.jbo.jbotester.panel.BindingPanel. < init > (BindingPanel.java:88)
    to oracle.jbo.jbotester.panel.BindingPanel. < init > (BindingPanel.java:71)
    at oracle.jbo.jbotester.form.BindingForm.createMasterPanel(BindingForm.java:63)
    at oracle.jbo.jbotester.form.BindingForm.init(BindingForm.java:98)
    to oracle.jbo.jbotester.form.JTForm. < init > (JTForm.java:72)
    to oracle.jbo.jbotester.form.BindingForm. < init > (BindingForm.java:50)
    to oracle.jbo.jbotester.form.FormType$ 1.createForm(FormType.java:63)
    at oracle.jbo.jbotester.form.FormType.createForm(FormType.java:199)
    at oracle.jbo.jbotester.form.FormType.createTab(FormType.java:270)
    at oracle.jbo.jbotester.form.FormType.showForm(FormType.java:248)
    at oracle.jbo.jbotester.form.FormType.showForm(FormType.java:207)
    at oracle.jbo.jbotester.form.FormType.showForm(FormType.java:203)
    at oracle.jbo.jbotester.tree.ObjTreeNode.showForm(ObjTreeNode.java:140)
    at oracle.jbo.jbotester.tree.ObjTreeNode.showForm(ObjTreeNode.java:123)
    at oracle.jbo.jbotester.tree.Tree.processTreeMouseClicked(Tree.java:728)
    in oracle.jbo.jbotester.tree.Tree.access$ 100 (Tree.java:96)
    to oracle.jbo.jbotester.tree.Tree$ TreeMouseListener.mouseClicked (Tree.java:141)
    at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:253)
    at java.awt.Component.processMouseEvent(Component.java:6266)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
    at java.awt.Component.processEvent(Component.java:6028)
    at java.awt.Container.processEvent(Container.java:2041)
    at java.awt.Component.dispatchEventImpl(Component.java:4630)
    at java.awt.Container.dispatchEventImpl(Container.java:2099)
    at java.awt.Component.dispatchEvent(Component.java:4460)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4247)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
    at java.awt.Container.dispatchEventImpl(Container.java:2085)
    at java.awt.Window.dispatchEventImpl(Window.java:2475)
    at java.awt.Component.dispatchEvent(Component.java:4460)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Caused by: java.lang.NullPointerException
    to the model. ImageViewRowImpl.getBoundary (ImageViewRowImpl.java:139)
    to the model. ImageViewRowImpl$ AttributesEnum$ 3.get(ImageViewRowImpl.java:47)
    to the model. ImageViewRowImpl.getAttrInvokeAccessor (ImageViewRowImpl.java:171)
    at oracle.jbo.server.ViewRowImpl.getAttribute(ViewRowImpl.java:864)
    ... more than 49
    # # 0 in detail
    java.lang.NullPointerException
    to the model. ImageViewRowImpl.getBoundary (ImageViewRowImpl.java:139)
    to the model. ImageViewRowImpl$ AttributesEnum$ 3.get(ImageViewRowImpl.java:47)
    to the model. ImageViewRowImpl.getAttrInvokeAccessor (ImageViewRowImpl.java:171)
    at oracle.jbo.server.ViewRowImpl.getAttribute(ViewRowImpl.java:864)
    at oracle.jbo.uicli.binding.JUCtrlValueBinding.internalGetAttributeValueFromRow(JUCtrlValueBinding.java:1157)
    at oracle.jbo.uicli.binding.JUCtrlValueBinding.getAttributeFromRow(JUCtrlValueBinding.java:751)
    at oracle.jbo.uicli.binding.JUCtrlValueBinding.getAttributeFromRow(JUCtrlValueBinding.java:779)
    at oracle.jbo.uicli.binding.JUCtrlAttrsBinding.updateValuesFromRow(JUCtrlAttrsBinding.java:145)
    at oracle.jbo.uicli.binding.JUCtrlAttrsBinding.refreshControl(JUCtrlAttrsBinding.java:245)
    at oracle.jbo.jbotester.BindingAdapter.refresh(BindingAdapter.java:69)
    at oracle.jbo.jbotester.panel.CardPanel.refreshAll(CardPanel.java:128)
    at oracle.jbo.jbotester.panel.RowSetPanel.refreshAll(RowSetPanel.java:206)
    at oracle.jbo.jbotester.panel.RowSetPanel.showCard(RowSetPanel.java:236)
    at oracle.jbo.jbotester.panel.RowSetPanel.setIterator(RowSetPanel.java:105)
    at oracle.jbo.jbotester.panel.BindingPanel.setBindingContext(BindingPanel.java:118)
    to oracle.jbo.jbotester.panel.BindingPanel. < init > (BindingPanel.java:88)
    to oracle.jbo.jbotester.panel.BindingPanel. < init > (BindingPanel.java:71)
    at oracle.jbo.jbotester.form.BindingForm.createMasterPanel(BindingForm.java:63)
    at oracle.jbo.jbotester.form.BindingForm.init(BindingForm.java:98)
    to oracle.jbo.jbotester.form.JTForm. < init > (JTForm.java:72)
    to oracle.jbo.jbotester.form.BindingForm. < init > (BindingForm.java:50)
    to oracle.jbo.jbotester.form.FormType$ 1.createForm(FormType.java:63)
    at oracle.jbo.jbotester.form.FormType.createForm(FormType.java:199)
    at oracle.jbo.jbotester.form.FormType.createTab(FormType.java:270)
    at oracle.jbo.jbotester.form.FormType.showForm(FormType.java:248)
    at oracle.jbo.jbotester.form.FormType.showForm(FormType.java:207)
    at oracle.jbo.jbotester.form.FormType.showForm(FormType.java:203)
    at oracle.jbo.jbotester.tree.ObjTreeNode.showForm(ObjTreeNode.java:140)
    at oracle.jbo.jbotester.tree.ObjTreeNode.showForm(ObjTreeNode.java:123)
    at oracle.jbo.jbotester.tree.Tree.processTreeMouseClicked(Tree.java:728)
    in oracle.jbo.jbotester.tree.Tree.access$ 100 (Tree.java:96)
    to oracle.jbo.jbotester.tree.Tree$ TreeMouseListener.mouseClicked (Tree.java:141)
    at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:253)
    at java.awt.Component.processMouseEvent(Component.java:6266)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
    at java.awt.Component.processEvent(Component.java:6028)
    at java.awt.Container.processEvent(Container.java:2041)
    at java.awt.Component.dispatchEventImpl(Component.java:4630)
    at java.awt.Container.dispatchEventImpl(Container.java:2099)
    at java.awt.Component.dispatchEvent(Component.java:4460)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4247)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
    at java.awt.Container.dispatchEventImpl(Container.java:2085)
    at java.awt.Window.dispatchEventImpl(Window.java:2475)
    at java.awt.Component.dispatchEvent(Component.java:4460)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)



    I´ll appreciate a lot any help you can give me, thank you and sorry for my English.

    How can I test this? I don't have the DB or data.

    You must at least close the stream and the input stream of the blob field, otherwise you can read the blob again until the next retrieval from the database.

    public String getBoundary() {
    try {
    BlobDomain blob =  getImage1();
    InputStream is =blob.getBinaryStream();
    BufferedImage bi = ImageIO.read(is);
    is.close();
    blob.closeInputStream();
    int width = bi.getWidth();
    int heigth = bi.getHeight();
    if(width>heigth)
    return Integer.toString(width);
    else
    return Integer.toString(heigth);
    } catch (IOException e) {
    e.printStackTrace();
    return null;
    }
    }
    

    Try this...

    Timo

  • Get the width and height of the image

    Hi scripters

    I try to get the width and height of my image file. Here is my code

    myPicFile = File("c:\\ar.eps");

    h = myPicFile.height;

    w = myPicFile.width;

    Alert (h)

    Copy the following code generates error

    ---------------------------
    Script alert
    ---------------------------
    undefined
    ---------------------------
    Ok
    ---------------------------

    How can I get the height and the width of my image? is there another method?

    Thanks in advance

    concerning

    a you are the

    Dear Arul,

    Here, my code is in InDesign. I don't know that we get the size of the Image directly. ?

    Throught InDesign [you using the InDesign Script then] Script here I pasted the code below...

    = Image height / width =.

    myDoc var = app.activeDocument;

    myPicFile = file ("E:\\HariharaSudhan\\Blue hills.jpg");

    App.place (file (myPicFile);

    = Then u please select the Image file in InDesign and then you run the script = / /.

    mySel var = app.selection [0];

    var limit = mySel.geometricBounds;

    var height = related [2] - bound [0];
    var width = Bound [3] - bound [1];

    Alert ("Image Height:" + height + ""+"Image width:" + width);

    = End: getting the Image height / width =.

    Please let me know if you have any questions.

    Thank you & best regards

    Thierry T.R.Harihara

  • How can I do to get the Apple CERT?

    How can I do to get the Apple CERT?

    http://training.Apple.com

  • How do I do to get the slide to set up to go to the right and continue? I was up half the night and is not wrong. The only thing that I just did is plugged into the wall outlet and now I'm right back where I had problems. Why keep this product?

    How do I do to get the slide to set up to go to the right and continue? I was up half the night and is not wrong. The only thing that I just did is plugged into the wall outlet and now I'm right back where I had problems. Why keep this product?

    What do you exactly mean by "get the slide to set up go to the right and continue"? Can you give us a little more context and detail?

  • How and if I can get the Vista OEM disc.

    How and if I can get the vista OEM disc. Install win 8 did not know that it would take on my vista os that Microsoft wants everyone to high grade don't like win 7 and win 8 is not working properly I want to reinstall vista. Laptop has been used without disk key code.

    Hello

    There is no Windows Vista downloads available from Microsoft.

    You can contact your computer manufacturer and ask them to send you a set of recovery disks.

    They should do this for a small fee.

    To reinstall Vista using their recovery disk/s, you start from the 1st recovery disk they provide and follow the manufacturer's instructions to reinstall:

    You need to change the Boot order to make the DVD/CD drive 1st in the boot order:

    How to change the Boot order in BIOS:

    http://pcsupport.about.com/od/fixtheproblem/SS/bootorderchange.htm

    "How to replace Microsoft software or hardware, order service packs and replace product manuals.

    http://support.Microsoft.com/kb/326246

    Some manufacturers have more available Vista recovery disks.

    If this happens, you may need to try this instead:

    You can also borrow and use a Microsoft Vista DVD, which contains the files for the different editions of Vista (Home Basic, Home Premium, Business and Ultimate) must be installed. The product key on your computer / Laptop box determines what Edition is installed.

    Other manufacturers recovery DVDs are should not be used for this purpose.

    And you need to know the version of 'bit' for Vista, as 32-bit and 64-bit editions come on different DVDs

    Here's how to do a clean install of Vista using a DVD of Vista from Microsoft:

    "How to do a clean install and configure with a full Version of Vista '

    http://www.Vistax64.com/tutorials/117366-clean-install-full-version-Vista.html

    And once the operating system is installed, go to your computer manufacturer's website and get the latest drivers for your particular model or laptop computer.

    And phone Activation may be necessary when you use the above installation method.

    "How to activate Vista normally and by Activation of the phone '

    http://www.Vistax64.com/tutorials/84488-activate-Vista-phone.html

    See you soon.

  • Canoe open attachment how to "link control panel Association the value of Set?

    Canoe open attachment how to "link control panel Association the value of Set?

    Hello

    something, you should also know, is that you need the program installed on your computer where the attachment file extension refers too

    and read this to set the file association

    How do I... Change file extension associations in Windows Vista?

    http://www.TechRepublic.com/article/How-do-i-change-file-extension-associations-in-Windows-Vista/6172036

Maybe you are looking for