How to customize display in ItemRenderer according to its index in the dataProvider in Flex 4.1?

I went through a lot of forums to get this answer, without success. I have to admit, I'm quite 'green' with Flex and my mother tongue is the French, so if I am not clear, I apologize.

I would like to use the same ItemRenderer for all items in a list, but only for the first (index = 0) item in the dataProvider I have 1 child of the non-visible ItemRenderer.

Currently, I have something like that in the ItemRenderer:

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

var itemList:List = owner as list;

var listProvider:ArrayCollection = itemList.dataProvider as ArrayCollection collection;

var isFirstItem:Boolean = false;

If (listProvider.GetItemIndex (Data) == 0) {}

isFirstItem = true;

}

}

And then if isFirstItem = true, I hide the child I wanted to hide for the first item in the data provider.

The problem is that listProvider.getItemIndex (data) == 0 seems to be true not only to article 1 in the dataProvider. The child I want to hide becomes too hidden on some (not all).

It seems to be linked to the fact that the list has a scroller and so not all items in the list are shown at the same time.

Does anyone have an idea how I could do this? Or just some advice, I'm really out of the solutions here.

Thank you!

do you explicitly say if the first element then hide the child, see the thing of the child

itemrenderers are reused, so if you do not have the else clause so when you scroll the rendering engine is displayed in its original state

(I guess)

Tags: Flex

Similar Questions

  • How to restore a shortcut to folder with its contents after the removal of the trash

    How to restore a shortcut to folder with its contents after the deletion of the Recycle Bin in vista

    Hello

    you deleted the shortcut, not the content; haven't you?

    This program recovers deleted data, etc.:

    http://www.Piriform.com/Recuva

    ___________________________________________

    Why not just make a new shortcut?

    http://www.ehow.com/how_5104544_create-desktop-shortcuts-Windows-Vista.html

    How to create Windows Vista desktop shortcuts

  • How can I display a variable evolution in a Subvi on the face before of the main vi as the Subvi is excuting

    In the attached document the vi on the right is sub to the vi on the left. On the Subvi on the right of the variable "playing field" is continuously updated on the façade of the Sub - VI as the loop 'for' is executed, but only the last value of the variable is updated in the table main before vi which is what is expected. My question is how can I display the evolution of the value of 'Playing field' on the main façade of vi that the loop 'for' in the Sub - VI is running?

    Thank you.

    I don't have the drivers you are using. But here's an example of how update an indicator of a Subvi. To create the reference control in the Subvi, select control refnum in refnum palette and drag a numeric (or other) on the refnum control.

    VI the appellant

    Subvi

  • How can I display characters in 'Wireless Network Connection' - > 'Properties' when the checkbox "show characters" is grayed out?

    How to display hidden characters in the Properties tab, in the connection, that I am using, under the wireless network connection box when that I should be able to check box is greyed out and unclickable?

    Also NOTE: When you try to use ctrl-p method, a ctrl-v, at the point where you click the box of characters on that he blanks.

    Hello

    You are connected to a domain?

    If the show characters check box is grayed out, the network, or the computer may be restricted by a group or local policy.

    If this computer is connected to a working network, I suggest you contact your help desk or IT Department.

    Concerning

  • HP Pavilion Notebook - 15-p108: How can I remove audio beats CORRECTLY and its replacement by the Realtek HD Audio Manager? Help?

    Hello, I am running Windows 10 64-bit Edition-Standard-Core family, previously windows 8.1 I could uninstall Beats by uninstalling the Realtek drivers, and then by reinstalling drivers realtek generic on their site, I was able to replace the Panel of Beats Audio with the Realtek HD Audio Control Panel.

    When you try to do it now, Beats can reinstall itself even if I use the generic driver from Realtek... Is it possible to prevent this? Or is my only hope to sell this laptop and buy another brand?

    Thanks in advance.

    lemagex

    Edition all the old driver sound

    install the new

    http://ftp.HP.com/pub/SoftPaq/sp72001-72500/sp72094.exe

  • Table of cleavage according to its index

    Hi all

    I want to have a 'demux' block which, having a table (2Nx1) as input, splits the data into two tables (Nx1) as output the first array index is even or odd...

    At first, I tried to implement this with a structure matter in a while loop:

    But this does not work because I can run ony this .vi when the outputs of the case have option "default if unwired" located on. And this will happen not a pair of paintings (Nx1), but a pair of paintings (2Nx1). The first table will be [value, 0, 0,..., value] and the second will be [0, value, 0, value...]

    I want to get rid of these zeros...

    Any tips?

    Thanks in advance!

    Try the table to decimate . That's probably all you need.

    Here are some general comments to your code in general:

    • As the number of iterations is known before the loop starts, you need a loop FOR. no need to wire N or compare the number of iterations. It will automatically browse for all items in the table of entry autoindexing and then exit the loop. In addition, output indexing on a loop is much more effective, because the table output sizes can be determined and allocated exactly before the start of the loop. With a loop, labview can do that.
    • If you 2012 LabVIEW, you can use conditional indexation on the exit tunnels.
    • You can wire the rest directly to the structure of the case and make a case 1 and the other 0. Less code! (See my signature).
    • To check the odd vs even, a logical operator AND with 1 is sufficient and effective.
    • The '-1' is before the loop because you have to do only once (well, the compiler recognizes loop invariant code and will in fact create the code compiled as if the "-1" have been before the loop, but why not be explicit?)
    • When you create a screenshot of the code, try no. to select anything.  Black dotted outlines are bothersome.
  • How can I configure a game controller for its use prevents the screensaver from starting

    I use a game controller on Windows 7 Pro 64 with Windows 7 (driver HID-compliant game controller). Windows does not seem to recognize this game controller entry, then the screen saver turns on permanently. I tried to turn on "allow this device to wake the computer" in Device Manager. But still no luck. Unfortunately, I'm not allowed to disable the screen saver. Any idea?

    Hi Thomas,

    Thank you for your reply and very clear description.

    Check with the manufacturer of the device if you have the latest updates, if there is, install them.

    If the problem persists, please turn off the screen saver.

    We look forward to your response to help you better.

  • How to customize the 3 buttons on the front of the Portege R400?

    I wonder if it is possible to customize the function of the three buttons on the front of my R400?

    For the moment, they seem to do nothing. I would use both of them as PgUp and PgDn display documents in tablet mode.

    Using the program "Toshiba button Support" I am only able to set the knob to "e-mail" under the screen.
    Documentation, forum, knowledge base do not mention anything about the R400 and three buttons. At least not how we define their function.

    Is to customize their possible at all?

    Hello

    What buttons do you mean exactly?

    As far as I know there are 5 different buttons;

    -Switch
    -Cross-functional button
    -ESC/display rotation button
    -Windows Security button
    -Toshiba email button

    The user manual must provide details of the simple buttons.
    But as I m don't me wrong, the configuration button is not editable. It's fix.

    You're right about the utility of Toshiba button support. This utility controls the functionality of the mail button. It is a single button that can be configured and you could assign an application to the it.

    Concerning

  • How can I make sure my internet cable works even if the icon is not displayed by the clock

    I see the wireless connection icon, but I used to see one for the wired connection also. So where is it?

    How can I make sure my internet cable works even if the icon is not displayed by the clock?

    Click Start > Control Panel > network and Internet > network connections.

    Click with the right button on your Local network, and select Properties. In the window properties of LAN make you that these boxes are checked.

    [] Display the icon in the Notification area when connected

    [] Notify me when this connection is limited or no connectivity.

    Click [OK] and get out of here!

    Right-click on start and select Properties. On the taskbar and Start Menu click the taskbar tab, and then click the Customize in front of the Hide icon button inactive and it make sure that the option 'always show' for the local network is selected.

    HTH,

    NASS - http://www.nasstec.co.uk

  • How to customize the Manager?

    I'll have two fields in my HFM. How to customize this Manager as change color of background and positioning of these two fields?

    u may not have added the title of Manager finally like that

    This.Add (titleManager);

    I don't care

    Check this code

    Hey Chk this Code

    Display d;
    MyManager()
    {
    CustomTitleManager titleManager = new CustomTitleManager (d.getWidth (), d.getHeight ());
    Bitmap image = Bitmap.getBitmapResource ("xxx.png");
    BitmapField myBitmapField = new BitmapField (image, Color.BLUE);
    titleManager.add (myBitmapField);
    titleManager.add (new LabelField ("Documents"));
    This.Add (titleManager);

    }

    -----------------------------------------------------------------------------------------------

    /*
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    */

    com package;

    Import net.rim.device.api.ui.Color;
    Import net.rim.device.api.ui.Field;
    Import net.rim.device.api.ui.Graphics;
    Import net.rim.device.api.ui.Manager;

    /**
    *
    Rakesh * @author
    */
    SerializableAttribute public class CustomTitleManager extends Manager
    {
    int width, height;
        
    public CustomTitleManager (int a, int b).
    {
    Super (Manager.NO_HORIZONTAL_SCROLL);
    Width = a;
    Height = b;
    }
       
    protected void sublayout (int width, int height)
    {
    Field field;
    int noOfFields = getFieldCount();
    int x = 0;
    int y = 0;
    for (int i = 0; i)< nooffields;="">
    {
    field = getField (i);
    setPositionChild (field, x + 10, y + 10);
    layoutChild (field, width, height);
    }
    setExtent (Width, Height);
           
    }
       
        
    protected void paint (Graphics graphics)
    {
    graphics.setBackgroundColor (Color.LIGHTCORAL);
    Graphics.Clear;
    Super.Paint (Graphics);
    }
     
    }

    Answer me as soon as u get it

  • Customize display of LOV attributes

    Hi all

    In normally, when creating the list of attribute values:

    Once we have selected the attribute list, following the tips UI tab we select available display attribute, for example: I select two attributes: CountryID and %provinceName%%-> means it's multiple values are separated by white space like this: England 1... The question is how can customize to: 1. England

    I want to replace '. 'instance of 'space'. " Thank you

    The trick is that you add an attribute that is calculated for the sql like

    Select country_id, country_name, country_id | ' ' || country_name as country LOV

    COUNTRY_ID, COUNTRY_NAME LOV

    ---------- ---------------------------------------- -------------------------------------------

    AR Argentina AR Argentina

    To THE Australia in THE Australia

    BE Belgium Belgium BE

    BR BR Brazil

    you use the country_id to store the selected value and the LOV column to display the user interface options.

    Timo

  • Interactive report: How can I display carriage returns?

    Hello everyone.

    Here's my problem: I created a table that contains a field COMMENT varchar2 (4000) and using APEX 4.1 I built an interactive report on it.

    Users can fill the COMMENT field with phrases on different lines, ex:
    "It is the first line.
    This is the second line

    It comes to the third line.

    This is handled correctly in the FORM, where I set the COMMENT as "Text area", but in the REPORT field, I wasn't able to put it in a way that allows to see whit transport returns: content is displayed on a single line only: "it's the first linethis is the second linethis is the third line.
    I tried and put all the possible field types, but I didn't find any ways to display the content exactly as it is (with some carriage returns).
    Of course, I can't use HTML
    Since I can't ask users to numbers it when their text is inserted.

    Could anyone suggest me how to get to this result? Need to use the interactive report because the search/filter tool is essential.

    Thanks in advance,
    Daniele

    user9211286 wrote:
    Hello

    I tried your suggestion apply to all the report (I have 3 areas to be managed in the same way). I tested it by changing the color, just to prove it works fine:

    
    

    It works very well!

    If I type the following, on the contrary, it does not work: business as usual (I use IE - 7). Should I do something more?

    
    

    What theme are you using? IE7 does not support attribute selectors in older themes in quirks mode.

    In any case, suggests to apply it to all fields: what is the correct command to force the APEX to show the contents of a field accordingly to the transport of text returns? in your example, you wrote "white-space: pre' but I think that this is not my case."

    Why not?

    http://reference.SitePoint.com/CSS/white-space

    You will see that the parameters of the line before or an envelope pre better match your needs. It depends on the content of your text, and how you want it to display.

  • How to prevent (text) messages to display on my tv using my iPhone to the apple tv airplay?

    How to prevent (text) messages to display on my tv using my iPhone to the apple tv airplay?

    If you use, you can not, since that's what mirroring is mirroring, it reflects your screen. If the content you watch support it try to turn the mirror off the coast and just use airplay to base.

  • How can I display a grid of horizontal alignment in Pages.

    How can I display a grid of horizontal alignment in pages. I can show a vertical, but there seems to be no option to show a horizontal. I use El Capitan with maps, version 5.6.2 Pages.

    Pages v5.6.2 has horizontal and vertical guides, but no grid. The vertical guide is enabled in the menu Pages: preferences: sovereign.

    With the two visible leaders after menu display: display the rule, place the cursor of the black needle on the edge of the respective sovereign and then click. When you see the following icon, drag the new guide in your document. Several vertical and horizontal guides may be present. The view menu has an element of Guides to hide menu or erased.

    • Indicator of horizontal ruler guide
    • Indicator of vertical ruler guide
  • How can I display the bookmark shortcut?

    The most recent update has deleted the bookmark button in my toolbar.
    Bookmark star also disappeared to the right next to my homepage of Foxfire.
    When I go in the menu at the far right of the Foxfire homepage bookmark Star opens a bookmarks column that cannot be added to, sorted or edited.
    There is no 'bookmark this Page' in the bookmarks column. There is instead a "change a bookmark this" which is unusable.
    When I try to move a bookmark in the bookmarks column I get only a gray bar mobile but no movement of associated bookmark and I can't delete the bookmark.

    In Firefox current releases the menu entry 'Bookmark this Page' in the bookmarks menu changes to "Edit this bookmark" once you have bookmarked the page and the star on the Navigation bar is highlighted blue.

    So do not get confused by the lack of 'Bookmark this Page' in the menu bookmarks and see "Edit this bookmark" instead if you try to bookmark a page that is already set bookmark.

    Note that you no longer have the bookmarks star in the address bar, but now have a star/record button combined to bookmark the link and open the drop-down list in the bookmarks menu that has "Show all bookmarks" at the bottom of the list

    In current Firefox released (29 and following), which are have a UI Australis, the orange Firefox menu button has been replaced by the three button bar of Menu of Firefox at the far right of the Navigation bar and this button is always visible, if you have the bar of menus visible or hidden
    A consequence of this situation, it is that you can no longer hide the Navigation toolbar

    • There is a star as the button next to the search bar on the Navigation toolbar to bookmark the current web page and a "Show bookmarks" button next to it to open bookmarks in a menu drop-down.
      You can find "Show all bookmarks" to open the bookmarks (library) at the bottom of the drop-down list manager
    • If bookmark you a page, then 'Bookmark this Page' in the bookmarks menu replaces it with "edit this bookmark".
    • You bring up the title bar via the "Title bar" button at the bottom left in the palette to customize window

    It is still possible to have the bar of menus visible via the menu popup of a toolbar for menus as the file menu to print (Ctrl + P) and preview before printing and the bookmarks menu available.

    See also:

Maybe you are looking for

  • iMac does not start after the update of the Sierra...

    Don't know what to do. Sierra, just updated and now my system hangs during startup and turns off. Anyone else seen this? No idea what I can do?

  • Constant errors of Satellite U400-15B & jams

    Hi all I've only had the laptop for months cutting and reently started having problems with the thing just lock up and freezing with no response to keyboard entries that starts to be really annoying, so if someone can help please tell me how to fix t

  • Airport Extreme, loss of internet connection of 5 GHz

    When I connect one of my devices (iPad, iPhone or Mac) to Airport Extreme, I see that the internet connection is down at any time. I started a continuous ping to an internal device and the external website using the ip address and I see a time-out fr

  • Equium A200-V10 - where to find the reference scenario

    Hello I wonder if anyone knows where I can get a Toshiba Equium A200-V10 based case as my 1 is cracked and he needs a new thank you

  • A descriptor of KING in an output file

    What is the best way to export a KING descriptor to a file such that it can be read later during a test.  I would like to export a number of descriptors of KING to say a file txt, excel file, or some other choice if there is a better option. Thank yo