Layout and properties on the created dynamically containers

I want to show multiple rows of tiles (3 x 2 on portrait, 2 x 3 on the landscape or square screen).

I have a ComponentDefintion for a line which is a container with StackLayout LeftToRight. To this, I add the tiles.

And the ComponentDefintion of the slab:

ComponentDefinition {
  id: tileDefinition
  Container {
     id: tileContainer
     property string imagePath
     property string hexColor
     onHexColorChanged: {
       background = Color.create(hexColor);
     }
     leftPadding: 15
     Container {
       layout: DockLayout {
     }
     ImageView {
       imageSource: tileContainer.imagePath
       id: tileImageView
       verticalAlignment: VerticalAlignment.Center
       horizontalAlignment: HorizontalAlignment.Center
     }
   }
  }
}

the container is created correctly, but the background and the value of the image.

However, the leftPaddig is ignored, and the imageview is not centered.

Quite strange, the line has 15 topPadding displayed correctly.

I tried to define the available dynamically using a DockLayout ComponentDefinition, but that is not the case.

Any ideas how to get the centered image and the successfully added leftPadding?

I solved the problem, the layout works very well if I give the outside container size by first using HorizontalAlignment.Fill, VerticalAlignment.Fill and StackLayoutProperties with spaceQuota: 1.0

the QML are sometimes mysterious

Tags: BlackBerry Developers

Similar Questions

  • Difference between variable interface user layout and presentation of the add() method UI?

    Hello

    What is the difference between a variable user interface layout and presentation of the add() method UI?

    Presentation of the variable user interface is something like this:

    var windowResource = "palette {  \
        orientation: 'column', \
        alignChildren: ['fill', 'top'],  \
        preferredSize:[300, 130], \
        text: 'ScriptUI Window - palette',  \
        margins:15, \
        \
        bottomGroup: Group{ \
            cd: Checkbox { text:'Checkbox value', value: true }, \
            cancelButton: Button { text: 'Cancel', properties:{name:'cancel'}, size: [120,24], alignment:['right', 'center'] }, \
            applyButton: Button { text: 'Apply', properties:{name:'ok'}, size: [120,24], alignment:['right', 'center'] }, \
        }\
    }";
    
    var win = new Window(windowResource);
    
    win.show();
    

    presentation of the UI Add() method is something like this:

    var w = new Window('dialog', 'Random Number Generator');
    var btn_group = w.add('group'),
        btn_ok = btn_group.add('button', undefined, 'Ok');
    
    w.show();
    

    Thank you!

    Since the Guide Javascript Tools on the specifications of the resource (you're high example on the page):

    You can create one or more UI both elements by using a resource specification. This specially formatted string provides a simple and compact of the creation of an element, including any container element and its constituent elements. The resource-specification string is passed as a parameter to the constructor function Window() or add().

    The general structure of a resource specification is a specification of item type (for example, dialog box).

    followed by a pair of curly braces surrounding one or more property definitions.

    myResource var = 'dialogue {control_specs} ";

    var myDialog is new window (myResource);.

    The controls are defined as properties in windows and other containers. For each control, give the name of the control class, followed by the properties of the control between braces.

    I had trouble getting the resource specifications to work - probably just didn't make the time to understand. A few differences is that some of the properties that they put in the resource specifications in brackets after the element will not work in the other method, if you do it this way. You normally have to make a second line and add this property. I'm not sure of the first method, but the second is the function object, and you can use the structure of the object (object, nextProperty, etc.) or set a variable to represent the object. In most of the scripts that I write, I use variables and give them a name such as:

    myCheckBox var = dlg.inSomeGroup.add ('checkbox', undefined, "text box '");

    myCheckBox.name = "maCaseACocher";

    By doing this, I can create a recursive function that goes through the entire user interface and retrieves the values of the elements and writes this information to an xml file. Including the names allows the script to identify which variable to control / it is in the xml file, so that it can be reassigned to proper control. I have not tried this with the method of specifications for resources, so I don't know if it will work with it.

  • How to access the methods and properties of the main document class

    How can I access methods and properties of the class of main document of other classes?
    Can someone give me a clue what I'm doing wrong?

    I use ActionScript3 in Flash CS3 with strict error checking on. I have an application with several custom classes:

    1. the MainMovie class is associated with the document.

    2. the SomeMovieClip class is associated with a movie clip symbol in the library and an instance of the symbol is placed on the main timeline.

    Compilation Flash returns this error message: "1061: call to a method may not set [name of the method here] through a reference with static type flash.display:DisplayObject.".

    I get the same error if I replace the undelined above with this code:

    root.gotoAndStop ("aFrameLabel");


    If I replace the same code simply with:

    trace (root)

    Flash returns [object MainMovie], which tells me that it recognizes the document class.

    However, if I turn the strict error checking, the compilation ends and the movie works as expected in all cases.

    root cast as a movieclip.

  • Cannot delete the created dynamically symbol Instance

    Hi all

    I have a symbol instance called from the library using this trigger:

    stopAll var = sym.getComposition () .getStage ().getSymbol("comb").getChildSymbols ();

    for (var i = 0; I < stopAll.length; i ++) / / returns the number of direct children

    stopAll [i] .stop (); / / create an instance of a symbol as a child element of the

    var chromo1 = $(sym.createChildSymbol_("Peak1_1",_"Stage").getSymbolElement ());

    chromo1. CSS ({marginLeft:175, marginTop: 500});

    Correctly, it stops all the symbols within a main symbol of the game and sets the "Peak1_1" symbol instance on the stage.

    Then, in the symbol that was instantiated ("Peak1_1"), I have a button symbol 'CloseChromo1' with the following

    var startAll = sym.getComposition () .getStage ().getSymbol("comb").getChildSymbols ();

    for (var i = 0; i < startAll.length; i ++)

    startAll [i] () .play;

    sym.getComposition () .getStage () .sym. $("Peak1_1") .remove ();

    The first three lines work and effectively restart the child symbols stopped.

    The fourth line, which should eliminate the instantiated scene symbol does not work. I've tried doing the name of the instance ("chromo1"), and hide using the GetSymbolElement, which does not work. I tried to use deleteSymbol() and referring to the tree of any symbol, from the level of Composition and it does not work. I tried all possible variants, I can think of, including SEO by children and their parents – still no joy.

    What I am doing wrong?

    Thanks in advance for any help!

    Matt

    I thought about it:

    You use the symbol should be deleted in as parameter for the deleteSymbol() method, as follows:

    sym.deleteSymbol ("Peak1_1");

    I wish JavaScriptAPI had examples documentation more and better!

    Thank you, resdesign, for your help.

  • Cannot delete the created dynamically symbols.

    I have a dynamically created symbol, enter a div. parent not the scene.

    using the:

    var sym.createChildSymbol = water ("water", "water_pos", 0);

    sin of the var = sym.createChildSymbol ("fishing_boat", "fishing_boat_pos", 1);

    I need 4 scenes animated but only show one at a time. It has been runnng slowly if left running for a while (which is also strange), so I'll try to load than I need.

    The symbols are creating perfectly, but for some reason any that I can't remove them whan I finished with them.

    I can remove the other symbols that were not dynamically created in the project but cannot pin new instances of symbols and delete them.

    I use the API deleteSymbol().

    I tried the right answer here, but it's Delete my screen while leaving a white BG?

    They suggest:

    You use the symbol should be deleted in as parameter for the deleteSymbol() method, as follows:

    sym.deleteSymbol ("Peak1_1");

    http://forums.Adobe.com/message/5283417#5283417

    I'm fooled!

    What I'm missing!

    Thanks for any help or suggestion.

    Johnny

    I found the solution of timjamarillo more on this thread: http://forums.adobe.com/message/4848076

    I took me a while to find so I'll put it here in case someone else needs it!

    .....

    It's probably a question of importance. I recommend to put all the functional code on Stage.compositionReady event, then call these functions from anywhere where you need.

    Put this code on Stage.compositionReady:

    Store your symbol

    sym.mySymbol;

    sym.createParticle = function() {}

    Pull the symbol in the library, add to the scene

    sym.mySymbol = sym.createChildSymbol ("Food_Spanner", "Stage");

    }

    sym.removeParticle = function() {}

    delete the symbol

    sym.mySymbol.deleteSymbol ();

    }

    Place this code on frame 1:

    sym.getComposition () .getStage () .createParticle ();

    Put this code on frame 15:

    sym.getComposition () .getStage () .removeParticle ();

  • On the view menu, I go to the page layout and then take the tick of the reviewing pane but to restart the review pane is back on. How can I make out of standby.

    How can I configure TB so that the message pane is disabled.

    using CCLeaner? See http://thunderbirdtweaks.blogspot.com.au/2012/06/thunderbird-and-ccleaner-or-my-settings.html

  • Set the properties of the control inside containers

    Hi, I need to know what is the reason why when I try to set a value in the text property of the TextInput in the control tabNavegator control.

    When I try to do

    Ctrol.Text = ' ';

    the error is:

    Error #1009: Cannot access a property or method of a null object reference.

    Help, please.

    With the navigator, such as TabNavigator and ViewStack container, etc. by children alone of the first view displayed by default are instantiated, and seen subsequent children are instantiated only when that view is accessible.

    You can set creationPolicy = "all" for the TabNavigator and this error will not occur, but if your user interface is complex it can affect startup performance.

    If this post answers your question or assistance, please mark it as such.

    Greg Lafrance - Flex 2 and 3 certified ACE

    www.ChikaraDev.com

    Flex / development, training, AIR and Support Services

  • Properties of the Start Menu and task bar

    In the tab Area of Notification of the bar of tasks and properties of the Start Menu window, under "system icons" it allows me to select which system icons I want to always show, such as; Clock, Volume, powerand there is a check box for the network, but it is translucent and does not allow me to check the box.

    I got this icon there before, but now he's gone and I want to.

    I let my brother use my computer and when I got back to this subject, the icon disappeared, so I have no idea how he managed to disappear, but I want to come back and have no idea how to do.

    Please help?

    Hi katrina_C_1o1,

    · You have security software installed on your computer?

    1. try the steps in the link below and check off the results: to display a network connection icon in the taskbar:http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/hnw_dc_show_icon.mspx?mfr=true

    2 Let us check whether your network services are working correctly. Follow the steps below:

    a. open the Start Menu and select run

    b. type services.msc in the Open Run box and press enter

    c. find the network connections, network list Service, knowledge of network and Service of Network Store Interface locations

    d. check that the status is set to started and the Startup Type is set to automatic

    e. If this is not the case, then right-click on the service and select start to start the service

    f. right click on the service and select Properties, change the startup type to automatic

    g repeat if necessary for the services listed in step 4

    With regard to:

    Samhrutha G S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Replacing / liquid vs layout of removal of the deletion Page layout

    Not sure if I should ask this here or in the general forum of InDesign. But when it comes using the "alternate" layout What is the main difference between 'deleting pages' vs 'removing putting substituting? I tested both, and deleting pages seems the deletion of the provision of "spare" created.

    I'm just trying to decide if its worth using pages of alternative provision, even without the import option, or if I should just glue at several indesign files.

    If you remove only the pages on the alternative plan, you do not delete the styles associated with this provision. As a rule, delete (or cancel) alternate layouts; do not delete pages unless you want to keep for some reason autour styles any.

    Although the import of other layouts is not yet supported, I still think it's interesting to use the functionality in some cases. For example, if I need to create a vertical layout of horizontal or an iPhone to an iPad folio version, I sometimes copy the document, create another layout and then delete the original layout of the document copied so that there is only one provision. Can I use the import function to import the items.

  • Lost documents, music and photos on the start bar

    Right now, when I try to left click on Documents, music and pictures (located to the right of the start menu) nothing happens.  For the moment, I deleted the folder music and images.  The documents folder is always present.  When I just lick on a folder, and then open the properties, the Properties window opens.  There is nothing is not displayed.  No file name, no disk space used, not location, and additional tab.  How can I fix without having to reinstall windows?  Thank you

    Hi tip10788,

    1. did you of recent changes on the computer?

    2. What do you get if you right click a folder in the start menu?

    To recover Documents, music or photo icon in the start menu, you'll need Customize Start menu settings.

    (a) open the bar of tasks and properties of the Start Menu by clicking Start , clicking Control Panel, appearance and personalization, and then clicking the taskbar and Start Menu.

    (b) click the Start Menu tab, and then click Customize.

    (c) in the Customize the Start Menu dialog box, select the options in the list you want, and then click OK.

    Customize the start menu

    http://Windows.Microsoft.com/en-us/Windows-Vista/customize-the-start-menu

     

    Check if you can access personal records of its original location.

    C:\Users\

    I hope this helps!

    Halima S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • What does the Create action not?

    Hello

    I use JDeveloper 10.1.3.4 and you have questions about the action Create {color} {color: blue}.

    I have a data table named USERS and a corresponding VO in the data control palette. Drag and drop the original Version of users to the page as a table with the column of enabled selection, I let the user be able both to delete a selected line and create a new line.

    I'm new to this, but for deletion, there is no problem: drag the delete action under the control of data users VO and drop it into the table {color: green} > table facets > Selection > af:tableSelectOne - Select and node {color}, then drop the request module commit an act on the page also as a commandButton control. And the selected line can be deleted and committed deletion using these two new buttons.

    Similarly, I dragged the action Create {color} {color: blue} and he fell in the table {color: green} > table facets > footer node {color} like a command button. When the page is running, nothing is visibly when you click on the button create {color} of {color: blue}. I understand that you do not select a line to create a new line, so I did not put the button create in the same node with the button Delete. And I guess I'll have to create a separate page for the user to enter the values in the fields on the line must be created.

    What I want to know, what's this button with the action {color: blue} create {color} inside is different than a generic commandButton created from the ADF Faces Core > commandButton? If I create a commandButton control in the component palette that is empty inside. But by using the action of creation as a commandButton control, is not yet clear to me that creating would make the action inside the key. On the other hand, there must be a reason for the {color: blue} action Create {color} be there slot that VO in the range of control data for us to use. What is the reason? And that makes the action Create {color} {color: Blue}?

    Thanks for answering my question!


    Newman

    Hello Newman,

    If you want your new line to be available in the whole of current lines (for example to edit directly in the table, not on a form), then take a look on the CreateInsert operation. Otherwise, you need a form to edit the new line.

    Check out these links:
    [13.6 creating an entry form: http://download.oracle.com/docs/cd/B32110_01/web.1013/b25947/web_form.htm#CACECCJA] in the dev guide
    [10.4 how to add a button create on a Page | http://download.oracle.com/docs/cd/B31017_01/web.1013/b25947/bcdcpal004.htm#sthref820] in the dev guide
    [New line using operation CreateInsert | http://andrejusb.blogspot.com/2006/12/creating-new-row-using-createinsert.html] in Blog of Andrejus Baranovskis

    What I want to know is how this button with the create action that it is different than a generic commandButton created from the ADF Faces Core > commandButton?

    When you create a button for the create action, your page links are configured automatically, then a link to action to create a to-do from the iterator is added to your pageDef (and this iterator is bound to your view object).

    And what is the Create action not?

    The create action creates a new line but does not insert it in the whole of lines.

    Kind regards
    Patrik

  • I have Acrobat Pro 10, when I installed the CD player, it has affected the way I was able to move text boxes when I create a form of gall, he has also affected my ability to release and change the properties of the fields /, I'm I suspect m

    I have Acrobat Pro 10, when I installed the CD player, it has affected the way I was able to move text boxes when I create a form of gall, he has also affected my ability to release and change the properties of the fields /, I'm I suspect my off lucky cat Adobe support will not help , nor a cure to.  Is there a place to find updates to Acrobat 10, if I uninstall my current program?  I still have my original CD and paperwork.  Adobe acknowledge that they have created this problem.   I worked very intensively with Acrobat Pro 10 on the form for a non-profit, I do part, and it happened immediately after that I was testing a form I created in Acrobat 10 to test with CD player. Windows 7 operating system

    This is usually due to the function 'Snap to Grid' is enabled. It can be accidentally activated via the keyboard, so this may have been what happened.

  • Attempt to create run time (dynamic) table and insert the data in this... The entrance is a flat file (txt file) which has the numbers and strings... I'm trying to convert them to a string and insert into the table. It is a matter of urgency for me please

    create or replace procedure Dynamic_Table AS

    iVal VARCHAR2 (32);

    iTemp varchar (200): = ";

    sql_stmt VARCHAR2 (200);

    l_file1 UTL_FILE. TYPE_DE_FICHIER;

    l_file utl_file.file_type;

    BEGIN

    l_file1: = UTL_FILE. FOPEN ('TEST', 'dinput.txt', 'R');

    EXECUTE IMMEDIATE ' CREATE TABLE baseline (Item_ID varchar2 (32))';

    Loop

    BEGIN

    UTL_FILE. GET_LINE (l_file1, iVal);

    EXECUTE IMMEDIATE ' insert into baseline values (: ival) "using ival;

    EXCEPTION

    WHEN No_Data_Found THEN EXIT;

    While some OTHER THEN dbms_output.put_line (SQLERRM); * /

    END;

    end loop;

    END;

    You are approaching this the wrong way.  Create an external table based on the file.  External tables are CSV, fixed width data in a queryable table.

    You will need to create an oracle directory to put the file in (MY_ORA_DIR) I leave it for you to do, and then perform the following...

    create table BASELINE)

    ITEM_ID varchar2 (32)

    )

    EXTERNAL ORGANIZATION

    (

    TYPE ORACLE_LOADER

    THE DEFAULT DIRECTORY MY_ORA_DIR

    ACCESS SETTINGS

    (

    RECORDS DELIMITED BY NEWLINE

    LOGFILE "dinput.log".

    BADFILE "dinput.bad."

    NODISCARDFILE

    FIELDS

    (

    ITEM_ID

    )

    )

    LOCATION ("dinput.txt")

    )

    REJECT LIMIT UNLIMITED

    /

    All the dubious records appear in dinput.bad. Dinput.log will give you information.

    External tables are read-only, so once you set up your file, you can create editable as a normal table.

    create table ITABLE_EDITABLE as

    Select * from BASELINE

    /

    Work done, a few lines of code.

  • What is the best way to create a form on my page layout of Muse for an event where the person is able to register and pay for the event using Business Catalyst?

    I need to create a Web site for a conference and I need to be able to have participants at the same time register you for the event on the website, but also paid for the event.  What is the best way to do it?  I am brand new to Business Catalyst and of course the customer must site upward and yesterday running.  So, if I could find quick assistance to implement it quickly, I would be very happy!

    Thank you!

    Hello

    Please take a look at these tutorials,

    Customizations made for the events module

    Let the site visitors sign up for an event

    Once configured, you can add modules in Muse and publish business catalyst. As shown in this article

    Add features of Business Catalyst to your Muse sites

    Easily add Business Catalyst modules to your Adobe Muse Web sites.

    Let me know if you have any question.

  • Calls the methods and properties created on a MovieClip

    Hi people!

    I noticed that CC animate now allows us to add AS3 on MovieClips on stage, as in the era of the AS2.

    So how do I correctly declare variables on a MovieClip and functions and call them from the main timeline?

    Thank you!

    If you look closely, the script that you add to a movieclip is actually happening in the main timeline, at the same level as the movieclip. It's an illusion that he's going on the movieclip itself. Try this script, after you select a movieclip with an instance name of say "box":

    import flash.events.MouseEvent;

    var something: * = this

    this.addEventListener (MouseEvent.CLICK, clicked);

    function clicked (e:MouseEvent) {}

    trace (Something.Name);

    }

    It will trace 'root1', not 'box '.

    If you were to put scripts in the timeline of the movieclip itself, you can call with:

    Box.someFunction ();

    If the instance name box. Like this in the main timeline:

    import flash.events.MouseEvent;

    var something: * = this

    this.addEventListener (MouseEvent.CLICK, clicked);

    function clicked (e:MouseEvent) {}

    Box.someFunction ();

    trace (Something.Name);

    }

    and this, in the area named movieclip:

    function somefunction() {}

    trace ("HI");

    }

    would trace 'Hi' and 'root1' when you click the box.

Maybe you are looking for

  • possibility of upgrading the quality of the video recording on the new MacBook?

    I had the intention of getting the new macbook. It is so beautiful and thin and light design is perfect, but the thing that keeps me every time is this ground low front facing camera. Anyone know if an upgrade is possible? Or through apple purchase o

  • Best Buy said that the Pure does not work on VZW

    The Moto X Pure is listed on the website of Best Buy, but they say:

  • HP 250 g4: should I upgrade the BIOS?

    HP support assistant informs: BIOS should be upgraded, but nothing has been done during the night. I tried to update manually, but in vain. Can I still update or whatever? ) If Yes, give me ftp link, pls. PS. HP support assistant does not recognize B

  • Win 7 updates "stuck".

    My new computer (Windows 7 OS) is to install updates & Stuck (2 hours) the #9 51 & says "do not turn off or unplug your machine '...  So what to do?

  • Blackberry design question

    Hi all I developed Blackberry application development using native blackberry.  In what I have to add several resolution devices supported.  In the design point of view I fill and margins to the fields in my screen. So I think that's not good program