Flex 4 custom layout: ascending list (close to)

Hello

I am trying to accomplish the same thing illustrated in this post: -0-RowIndex-starting-at-the-bottom http://StackOverflow.com/questions/4132392/How-can-i-Create-a-Flex-List-Component-with-the

I'm almost there, I have just one problem with the scroll bar, because it is always up and down. In the demo, you can see only the first 4 of 10 items are visible and the scroll bar moves in the wrong direction.

http://www.conceptualinertia.NET/aoakenfo/WP-content/uploads/temp/bottomup/BottomUpList.ht ml

Right click to view Source.

You may find it useful to work through the example in this blog post:

http://flexponential.com/2010/03/06/learn-how-to-create-a-simple-virtual-layout-in-Flex-4/

This is an example of simple horizontal layout, but if you make three small changes, you can get the items in reverse order.  Change these lines to be...

Line 304: for (var k: int = target.numElements - 1; k > = 0; k-)

Line 254: var element: ILayoutElement = target.getVirtualElementAt (target.numElements - 1 - k);

Line 169: for (var i: int = layoutTarget.numElements - 1; I > = 0; i--)

Tags: Flex

Similar Questions

  • Background with custom layout error

    Hello

    I have a screen that I put to use a background image, and I created a custom presentation of HFM

    but when I use my layout on the screen I get an 104 error not caught illegal argument exception.

    When I delete the code for the background image, the screen will display properly with my custom layout,

    How can I use my custom with a background image layout.

    Thank you

    Hello

    I ran my application with debugging and here is a screenshot of the debug window when my application crashes.

    He seemed to have solved the problem now my custom layout and and background displays correctly, I changed my background don't not to scale, can someone help explain this that when wrong when using Background.REPEAT_SCALE_TO_FIT

    Bitmap VO = Bitmap.getBitmapResource ("splashscreen.png");
    Background _bg = BackgroundFactory.createBitmapBackground (VO,
    Background.POSITION_X_LEFT, Background.POSITION_Y_TOP,
    ( Background.REPEAT_SCALE_TO_FIT) ;
    VerticalFieldManager _scrMngr = (VerticalFieldManager) getMainManager();
    _scrMngr.setbackground (_bg);

    Bitmap VO = Bitmap.getBitmapResource ("splashscreen.png");
    Background _bg = BackgroundFactory.createBitmapBackground (VO,
    Background.POSITION_X_LEFT, Background.POSITION_Y_TOP,
    ( Background.REPEAT_NONE) ;
    VerticalFieldManager _scrMngr = (VerticalFieldManager) getMainManager();
    _scrMngr.setbackground (_bg);

  • Custom layout of JavaFX nodes

    I'm developing an application for which it is necessary to nodes available in addition to the other (or on top of the other etc..). However, this provision is only an IPO and the user is able to move these nodes arbitrarily. How does correctly in JavaFX? I'll explain my problem with a simplified example:

    Guess I have 2 rectangles and want to place rect2 right of rect1.

    // create first rectangle at position x= 5, y=5 
    rect1
    = rectangle(5,5);
    // create second rectangle to the right of rect1
    rect2
    = rectangle(5+rect1.width(), 5);

    In this scenario JavaFX has not yet determined the width of rect1, and there will be zero. Intuitively, I would make a call that allows JavaFX rect1 and thus determine its width and then add rect2. See the following example:

    // create first rectangle at position x= 5, y=5 
    rect1
    = rectangle(5,5);
    // let JavaFX draw rect1 (width will be calculated and set)
    draw
    ();
    // create second rectangle to the right of rect1
    rect2
    = rectangle(5+rect1.width(), 5);

    Unfortunately, I have not found a method that does what I want. My current solution appealed to the Platform.runLater (), but this does not work properly all the time. If my interpretation of the links is correct, the links also are not appropriate for this problem. I want only to provision initially nodes, so I have to remove the link after the initial layout (or do rect2 would move if rect1 is moved).

    Thanks in advance for any help.

    Custom presentations are generally made subclassing region, the substitution of layoutChildren() and calculations of page layout based on the prefWidth and the prefHeight of the child nodes.  Best place to understand this for example is by examining the source code of JavaFX , as I've never seen a tutorial on the subject.

    A round, you can use that may or may not be suitable for you, is to use the layout panels for the default page layout, then use translate the properties to allow the user to the default layout components, the translation in this way you can avoid the creation of a custom layout component.

    Another way to do is to use a base pane as the layout container that is not automatic on her children, add children to the pane in the constructor of the component.  Layout() and applyCss() use children to measure children if necessary in order to determine the appropriate size.

  • Several custom layout Page?

    So it's a little hard to imagine a thread title that sets out succinctly what I have wrong here.

    Basically, I'm wondering if it is possible to display a * SINGLE * page of a * MULTIPLE * custom layout in the print module. It is quite possible, I'm just retarded and I'm missing something simple, but when I add a page to the page layout, he appears in what is basically a grid view, with all the pages visible at a time. Addition of pages just makes each smaller page. Of course, it is not an ideal situation to make layouts.

    So, am I missing sort of totally obvious to solve this problem? The print module makes page views when making contact sheets and so on, so I know it is theoretically possible. Or is it not feasible in custom mode?

    There is a zoom button of the page on the top left preview pane

  • Flex MXML custom list ItemRenderer with States

    Hello

    I have a list custom MXML ItemRenderer which has two States, according to a property of the data object.

    I noticed that the data are defined when creating ended (creationComplete) and not in the intitialize step.

    Thus, in the creationComplete handler I follow these steps:

    If (Data.isTrue)

    {

    this.currentState = 'IsTrue';

    }

    on the other

    {

    this.currentState = 'NotTrue';

    }

    Is this the right place to put this?

    Thank you.

    If you are using 4.5, you want to substitute getCurrentRendererState

  • Custom with LostFocus list field problems

    Hello experts!

    I made a custom, list field when I draw the lines, I made a solution using a personalized reminder, well... I have a problem when the list field lost focus, because when I have a focus to the button my list have a last item carried.

    I want to erase,

    Any suggestions?

    Best regards, Rampelotti

    in the drawListRow() method adds the underside before the draw.

    if(graphics.isDrawingStyleSet(Graphics.DRAWSTYLE_FOCUS))
    
  • Custom layout manager: question sublayout

    Trying to implement a border layout manager (see the code), I'm having problem with the sublayout method. When the method is called, the value for the parameter "width" is 240, but the value for the parameter "size" is "1073741823' that really confuses me. I expect the value of "260" that I have tested on a simulator of Pearl.

    Can someone shed some light on this subject?

    JDE: 4.3

    Simulator: 8130

    Here is the code:

    class BorderLayoutManager extends Manager {
    
        public BorderLayoutManager() {
            super(Manager.NO_VERTICAL_SCROLL);
        }
    
        //overwrite the nextFocus method for custom navigation
        protected int nextFocus(int direction, boolean alt)
        {
            // Find the next field to be focused
        }
    
        protected void sublayout(int width, int height) {
        // calculate the position of each field, then call
        // setPositionChild() and layoutChild() for each field
        }   
    
       public int getPreferredWidth(){
        // calculate preferred width
       }
    
       public int getPreferredHeight(){
        // calculate preferred height
       }
    }
    
    public class MyScreen extends MainScreen{
        public MyScreen(){
            super();
            BorderLayoutManager manager = new BorderLayoutManager();
            manager.add(BorderLayoutManager.NORTH, new LabelField("North"));
            manager.add(BorderLayoutManager.SOUTH, new LabelField("South"));
            manager.add(BorderLayoutManager.WEST, new ButtonField("WEST"));
            manager.add(BorderLayoutManager.EAST, new ButtonField("EAST"));
            manager.add(BorderLayoutManager.CENTER, new RichTextField("center"));
            add(manager);
        }
    }
    

    If your custom Manager Manager has vertical scrolling enabled, then the height will show that this large number.

  • custom layout and update the page elements

    Hello

    I'm working on an APEX application, I need a page to view issues and alternative options, such as only choose radio group or mutiple shoose by box. The user will then check the answers. After the answer questions, send the page to get the score.

    The presentation must be: separate regions by the kind of question. in each region, the question in the first line; the four options in the second line, the checkbox or a radio Fund; in the bottom of the page, there is a button "submit".

    The tables are designed as follows,
    create the table RULE_QA_SHEETS
    (
    SHEET_ID NUMBER of non-null,--ID for the answer of the question sheet
    Category NUMBER not null, - use a tmplate to build the leaf, for example, numbers of gender issue, easy or difficult
    PERSON_ID NUMBER not null,-the user who was answering questions
    DATE OF ANSWER_DATE,
    NOTE VARCHAR2 (4000 TANK)
    )

    create the table RULE_QA_SHEET_ITEMS
    (
    ITEM_ID NUMBER not null,--ID for the question in this form.
    SHEET_ID NUMBER not null,--master id of the table.
    QUESTION_ID NUMBER not null,--ID for the issue in the inventory.
    MEET VARCHAR2(30 CHAR) - the answer the user checked, will be compared to the inventory. Once the user to submit the page, this column will be updated.
    )

    I've not found a good report APEX model, and I can use dynamic content plsql to generate the layout but no idea how to upgrade the right answers.

    Everyone has the same experience, or give me a help, that would be great!

    Thank you!

    Chongwu says:
    Here is the connection info.
    Workspace: CHONGWU
    User: dev1
    Password: 1qaz2wsx
    Answers and the Question of enforcement 42990

    Could you please give me an example of this? page 15, pls help to control dynamic pl/sql region that generates the page layout.

    See page 150 in your application. I started with a copy of your page 15 and brought some changes in regions of dynamic PL/SQL to produce more semantic HTML by using ordered lists and labels. Labels provide also bigger clickable/tangible goals by answering the questions.

    declare
    
      i number := 1;
    
    begin
    
      htp.p('
      '); for q in ( select q.qa_id , q.question , q.answer_a , q.answer_b , q.answer_c , q.answer_d from rule_qa q where q.question_type = 'S') loop htp.p('
    1. ' || q.question || '
        '); htp.p('
      1. ' || apex_item.radiogroup(i, 'A', null, p_item_id => 'q-' || i || '-a', p_item_label => q.answer_a) || ''); htp.p('
      2. ' || apex_item.radiogroup(i, 'B', null, p_item_id => 'q-' || i || '-b', p_item_label => q.answer_b) || ''); htp.p('
      3. ' || apex_item.radiogroup(i, 'C', null, p_item_id => 'q-' || i || '-c', p_item_label => q.answer_c) || ''); htp.p('
      4. ' || apex_item.radiogroup(i, 'D', null, p_item_id => 'q-' || i || '-d', p_item_label => q.answer_d) || ''); htp.p('
      '); i := i + 1; end loop; htp.p('
    '); end;

    Some CSS is required for formatting required and to get the labels actually appear:

    ol.questions>li {
      margin-bottom: 1em;
      font-weight: 600;
    }
    ol.answers {
      margin: 0.5em 2em;
      list-style: lower-alpha outside;
    }
      ol.answers>li {
        clear: left;
        margin: 0.5em 0;
        font-weight: 400;
      }
      ol.answers>li span {
        display: inline-block;
      }
      ol.answers>li label.hideMeButHearMe {
        position: static;
        top: auto;
      }
      ol.answers>li input {
        float: left;
        margin: 0 0.5em 0 0;
        padding: 0;
        vertical-align: middle;
      }
    

    Finally, there is a simple process that records the answers in a collection of the APEX. Collections are frequently used apps Q & A and survey to store responses temporarily before their final transformation:

    declare
    
      answer varchar2(32767);
    
    begin
    
      /*
        Create or empty the APEX collection used to temporarily store the user
        responses.
      */
      apex_collection.create_or_truncate_collection('ANSWERS');
    
      for i in 1..50
      loop
        /*
          Dynamically capture the contents of each apex_application array...
        */
        execute immediate '
            begin
              :1 := apex_util.table_to_string(apex_application.g_f' || to_char(i, 'fm09') || ');
            end;'
          using out answer;
    
        wwv_flow.debug('apex_application.g_f' || to_char(i, 'fm09') || ' = ' || answer);
    
        /*
          ...and if there's a response then record it in the collection.
        */
        if answer is not null
        then
          apex_collection.add_member(
              p_collection_name => 'ANSWERS'
            , p_n001 => i
            , p_c001 => answer);
        end if;
    
      end loop;
    
    end;
    

    It appeals to a rather horrible dynamic assessment of the apex_application tables. As Howard points out, there is only 50 of these paintings, which can be limited if you plan to have more than 50 questions. A common way to avoid these two problems is to present only one question at a time (turn-off to back on the same page in a sort of Pseudo-Assistant until all questions are answered), so you only need to refer to a single table, known.

    Note, however, that I am not keen on this model of single table. You can consider using a more flexible and extensible model as in This example.

  • How to move a logo on the right side of the header and resize the area of the image - sensitive custom Layout HTML 5 - 11 of RoboHelp

    I created a page HTML 5 custom based on the layout Theme1_Standard layout.  Our logo is rectangular and does not fit in the default image area.  I want the logo to the right of the header.  I don't see how to do this in the customization of the Layout dialog box.  Is there a way to do this in the HTML somehow?  Moreover, the logo looks great in the office and the table overview of the customization of the Layout dialog box.  It is the right size and the header title fits right so that there is enough space for the rectangular logo. However, in the preview of the phone, the logo is tiny.  And when I generate the layout of reactive source HTML5 with the new theme, the logo is tiny in the preview of Chrome, even for the office.

    Thank you.

    Gina

    You can change this behavior in the main.css file. It's a little more work that you know well;

    Open the file with a text editor and search for "table.headertable td.logo". You can find parameters for the width of the logo, something like:

    Width: 4;

    Simply make it wider to adjust the image. Note that you need to do this several times as several devices have different widths for the logo.

    Kind regards

    Willam

  • Flex datagrid custom itemRenderer - column manufacturing is NOT MODIFIABLE

    Hi all

    I'm new to flex and trying to create custom editors and converters for datagrid. I came across this problem trying to fix another (http://forums.adobe.com/post! reply.jspa? message = 3569216)

    The problem is:

    I have a custom editor and a renderer for a column of text. The entire grid is editable (i.e., editable = true). But by clicking the cell does not show me the editor. However, if I change the rendering to mx.controls.label engine, clicking on it takes me to my custom editor.

    Can someone please tell what I am doing wrong? I paste the corresponding code for more details.

    DATAGRID: Replacement itemRenderer = "converters. TextRenderer' with itemRenderer = "mx.controls.Label" makes the editable column

    < mx:DataGrid id = "dg" editable = "true" rowHeight = "100" width = "861" x = "10" y = "10" height = "498" dataProvider = "{this.slideArray}" >

    < mx:columns >

    < mx:DataGridColumn headerText = "Text" width = "100".

    Resizable = "true" sortable = "false".

    itemRenderer = "converters. TextRenderer.

    itemEditor = "publishers. TextEditor.

    dataField = "text" editorDataField = "myData" / >

    < / mx:columns >

    < / mx:DataGrid >

    TEXT EDITOR

    <? XML version = "1.0" encoding = "utf-8"? >

    " < = xmlns:fx s:MXDataGridItemRenderer ' http://ns.Adobe.com/MXML/2009 "

    xmlns:s = "library://ns.adobe.com/flex/spark".

    xmlns:MX = "library://ns.adobe.com/flex/mx".

    focusEnabled = 'true '.

    Initialize = "initEditor ()" >

    < mx:TextInput id = "├editer" width = "{this.width}" height = "{this.height}" / > "

    < fx:Script >

    <! [CDATA]

    field of import. Slide;  contains a property: public var text: String

    override public function set data(value:Object):void {}

    Super.Data = value;

    This.Edit.Text = (value as Slide) .text;

    }

    public var myData: String; data field of the editor

    Import mx.binding.utils.BindingUtils;

    private function initEditor (): void {}

    BindingUtils.bindProperty (Thi, "myData", this.edit, "text");

    }

    []] >

    < / fx:Script >

    < / s:MXDataGridItemRenderer >

    TEXT RENDERING ENGINE

    <? XML version = "1.0" encoding = "utf-8"? >

    " < = xmlns:fx s:MXDataGridItemRenderer ' http://ns.Adobe.com/MXML/2009 "

    xmlns:s = "library://ns.adobe.com/flex/spark".

    xmlns:MX = "library://ns.adobe.com/flex/mx".

    focusEnabled = "true" >

    < s:Label id = "txt" horizontalCenter = red '0' = '0' / >

    < fx:Script >

              <! [CDATA]

    field of import. Slide;

    override public function set data(value:Object):void {}

                        Super.data = text;

    this.txt.text = (value as Slide) .text;

                   }

                                

              ]] >

    < / fx:Script >

    < / s:MXDataGridItemRenderer >

    Tips, I've tried and failed:

    1 added the following converter code

    public override function get data (): Object {}

    return super.data;

                   }

    2 remove/change focusEnabled

    3 wrote the same rendering in Actionscript engine - which in fact extend MXDataGridItemRenderer. I had to add the label txt component that helps addElement. By clicking on this shows th Editor, but it does not show the label txt at all... that is to say; I don't get all displayed text.

    I use Flex 4.0 sdk.

    I also noticed that Poser data of the rendering engine not pass data

    object through the base class.  I doubt that it is the cause, but it is

    worth fixing.

    Then after your last code, reduced as much as possible.

  • Custom layout

    Hi all

    Can anyone please suggest how to design models custom OAF page. The default page layouts does not have more than two fields horizontally and I don't want a table to be included. I mean I want 3 or four areas at the level of the header

    Is this possible?

    Please suggest

    Kind regards
    Rahul

    Hello Rahul,

    Depending on your needs, we can offer you a page layout. Layout of three columns can be achieved using messageComponentLayout using 3 columns (and the lines according to the number of fields to display). Set in the properties of the region.

    concerning
    Sumit

  • Searchmenu custom wizard does not close

    half lower part of the screen displays:

    The custom wizard SearchMenu. I don't know it's there and I can't get rid of it.
    Can you help me, please

    OK, so there seems to be a recent update of Fast Video Download that broke the version 3.6 of their add-on. You can upgrade to the latest version of Firefox at: http://www.mozilla.org/firefox

  • Pavilion 15-ab173cl: Menus and drop-down lists close before I can click on

    Any menu or drop-down to open menu closes before I can click on options. Happens if I right click on the screen to see the menu, right-click on any applications programs in the start menu to see options, when I'm in a browser and click on a drop down menu, etc. They all disappear until I can get a good look at all the options, or click on one.

    To select the options of "Operating System" for that matter and "choose the jury...". ", I had to click the menu drop down and then quickly use my arrow down to begin paging through the options. It's the only way I could get the drop down menu to appear for more than a second or two.

    It is a laptop brand new I used only once or twice, so any help would be greatly appreciated.

    Thanks for any help you can give me.

    Hi there @breazy_18.

    Welcome to the HP support community where you can ask questions, find solutions and get help from others in the community! I read your post on the Forums to Support HP and wanted soft hand for you.

    Have you tried to plug in an external mouse and see if it happens too?

    Have you tried to see if it occurs in Mode safe?

    Have you done the updates of Windows?

    Have you tried to use the HP Support Assistant?

    The best document I have for TouchPad problems is the use and troubleshooting of the TouchPad and ClickPad document. Go to mouse properties and "restore all defaults" then apply, and restart your laptop.

    Please ensure that all your updates are done also. I saw him in the past where it happened because an update does not pass.

    This answer doesn't solve your problem or answer your question? If so, please share the good news! Inform others that this answer was helpful by clicking on the button accept as a Solution . You can also show your appreciation by clicking thumbs-up.

    If you need assistance, I would be more than happy to continue to help you. Please re-post with the results of the resolution of the problems.

    Thank you!

  • Custom layout manager

    Hi all

    I can't create a custom presentation Manager. I extended the class Manager and set the getPreferredWidth() implement, the getPreferredHeight() and methods sublayout (int width, int height) but I have two LabelFields are not displayed.

    I would like to first of all fields of both label as shown in the image below, but I do not understand creation of custom models. I understand getPreferredWidth() and getPreferredHeight() sets the width and height of the Manager, but I'm confused with the method sublauout (int width, int height) and layoutChild and setPositionchild (field, int, int).

    I'd appreciate it if someone could point out tutorials, examples and notes for custom understanding models.

    Thank you

    Praveen Singh

    Hi arkadyz

    Thank you very much for the help.  I solved the problem I had, I tried to extend the class Manager and setPreferredWidth() to Display.getWidth () and setPreferredHeight() to return the height of the first field.  My problem is that I have added two LabelFields at my personal Manager and tried to keep them on the same line, which meant my int y variable has been created under the zero and my int variable x changed but these two variables x and is also used in setExtent(x,y); If I was getting setExtent (x, 0); which caused my labelfields does not show.

    protected void sublayout (int width, int height) {}
    int x = 0;
    int y = 0;

    for (int i = 0; i)< getfieldcount();="" i++)="">
    Field field = getField (i);
    layoutChild (field, width, height);
    setPositionChild (field, x, y);
    x += field.getWidth () + 90;
    y += 0;
    }
    setExtent (x, y + getField (0) .getHeight ());
    }

  • Officejet HP 7110 custom layout

    I have the Officejet HP7110 - printer large format and need to print a page of non-standard size. How to customize suitable installation? The current subscription does not include the size I need. The page is 257mmx397mm, margin, 38mm, straight, 20mm of margin margin 25mm up and down 22mm from the left margin. Any help would be appreciated.

    Hi Zbigniew,

    Welcome to the HP forums!

    I see that you have an Officejet 7110 and are wanting to do a custom size to print with. If you will be able to do it or not depends entirely if you use Mac or Windows.

    The HP Windows software does not support custom formats, but it does on Mac (you can see the printer service if you wish). Certainly, I understand that this can be frustrating if you are a Windows user, but I hope that you can use a different size that is supported if this is the case

    I hope that it helps to have a great day!

Maybe you are looking for

  • Preparing to intall...

    I see that I have four updates of my computer has tried repeatedly to do. They are all updated Office 2003. I keep trying to update and the process hangs on "preparing for installation...". "and is never further. He said as the last check for updates

  • How to open a file with the extension. Bc6

    He is a backup file on a backup disk. I can't open.

  • Error message from WCS (static WEP)

    Hi all We're migrating all the IOS AP to LWAP using WLC and WCS, we have several WLAN with a different set of security on IOS AP policy. I am facing a problem in the creation of WLAN on WCS server, I create a static model with WEP key with 128-bit en

  • Queries on WebDAV

    Hi team, Please could you suggest on my query below. What is the size limit of files in WebDAV? Open Text recommended max 100 documents, what happens when we go beyond the limit? Download large files (which is the limit for the download of a single f

  • BlackBerry Smartphones Facebook for blackberry Question?

    The love facebook app, I use facebook a lot and its great while I travel. But when I'm sitting at my laptop using facebook is a far from stop harmful which crosses to the blackberry application?