How to make items in a list word wrap as needed and be variable heights

I am trying to build a custom itemrenderer for the List control.  The items in the list are variable lengths of text, some of the text items will have different colors determined at runtime base on some criteria (this works fine now with my custom itemrenderer).  What I need is for the items to word wrap, and therefore for the list to display items of varying heights.  Is this possible to do?  All my attempts seem to have failed.  If I can't do this with an item renderer any suggestions about how to do this?  Thanks very much in advance to any of you gurus who are able to help me.

Trick here is not to specify any height for the renderer so that Flex will determine the height according to the content. Also set the variableRowHeight="true"
Here is a simple example
<mx:ArrayCollection id="dp">
        <mx:Array>
            <mx:Object label="some very long text"/>
            <mx:Object label="some very loooooooooooooooooooooooooooooooooong text"/>
            <mx:Object label="some very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong text"/>
            <mx:Object label="some very looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong text"/>
            <mx:Object label="some very long text"/>
        </mx:Array>
    </mx:ArrayCollection>
    <mx:List dataProvider="{dp}" variableRowHeight="true">
        <mx:itemRenderer>
            <mx:Component>
                <mx:Canvas width="100%">
                    <mx:Text width="100%" text="{data.label}"/>
                </mx:Canvas>
            </mx:Component>
        </mx:itemRenderer>
    </mx:List>

Similar Messages

  • How to make a query to list out Journal voucher that hasn't been posted

    Hi, do you know how to make a query to list out Journal voucher that hasn't been posted?
    By what code name identify that?
    Thanks.
    Raymond
    Edited by: Rui Pereira on Aug 6, 2008 3:57 PM

    jack,
    there is no link with OBTD to OJDT and JDT1.
    voucher number in obdt is different,
    after posting voucher is saved as journal entry seperate
    number is generated.
    you can link OACT,OCRD WITH OJDT,JDT1.
    Jeyakanthan

  • I don´t know how to make a phone call whit my ipad...and how to sent a message? is it possible?

    i don´t know how to make a phone call whit my ipad...and how to senSeleneGMt a message? What do i need? or is it impossible?

    You can't; not natively, anyway, since the iPad is not a phone. If you want to make a call, you'll need to use some third-party Voice-Over-IP service such as Skype.
    I'm not sure what you're asking when you ask about sending a message. If you mean a text message, you can either use iMessage, which can send messages to other users also running iMessage, or you can look in the iTunes Store for SMS apps, a few of which are available. They use separate services to actually send the message and so require an Internet connection, either WiFi or 3G.
    Regards.

  • How to get items from a list that has more items than the List View Threshold?

    I'm using SharePoints object model and I'm trying to get all or a subset of the items from a SharePoint 2010 list which has many more items than the list view threshold (20,000+) using the SPList.GetItems() method. However no matter what I do the SPQueryThrottledException
    always seems to be thrown and I get no items back.
    I'm sorting based on the ID field, so it is indexed. I've tried setting the RowLimit property on the SPQuery object(had no effect). I tried specifying the RowLimit in the SPQuerys ViewXml property, but that still throws a throttle exception. I tried using the
    ContentIterator as defined here:http://msdn.microsoft.com/en-us/library/microsoft.office.server.utilities.contentiterator.aspx,
    but that still throws the query throttle exception. I tried specifying the RowLimit parameter in the ProcessListItems functions, as suggested by the first comment here:http://tomvangaever.be/blogv2/2011/05/contentiterator-very-large-lists/,
    but it still throws the query throttle exception. I tried using GetDataTable instead, still throws query throttle exception. I can't run this as admin, I can't raise the threshold limit, I can't raise the threshold limit temporarily, I can't override the lists
    throttling(i.e. list.EnableThrottling = false;), and I can't override the SPQuery(query.QueryThrottleMode = SPQueryThrottleOption.Override;). Does anyone know how to get items back in this situation or has anyone succesfully beaten the query throttle exception?
    Thanks.
    My Query:
    <OrderBy>
        <FieldRef Name='ID' Ascending='TRUE' />
    </OrderBy>
    <Where>
        <Geq><FieldRef Name='ID' /><Value Type='Counter'>0</Value></Geq>
    </Where>
    My ViewXml:
    <View>
        <Query>
            <OrderBy><FieldRef Name='ID' Ascending='TRUE' /></OrderBy>
            <Where>
                <Geq><FieldRef Name='ID' /><Value Type='Counter'>0</Value></Geq>
            </Where>
        </Query>
        <RowLimit>2000</RowLimit>
    </View>
    Thanks again.

    I was using code below to work with 700000+ items in the list.
    SPWeb oWebsite = SPContext.Current.Web;
    SPList oList = oWebsite.Lists["MyList"];
    SPQuery oQuery = new SPQuery();
    oQuery.RowLimit = 2000;
    int intIndex = 1;
    do
    SPListItemCollection collListItems = oList.GetItems(oQuery);
    foreach (SPListItem oListItem in collListItems)
    //do something oListItem["Title"].ToString()
    oQuery.ListItemCollectionPosition = collListItems.ListItemCollectionPosition;
    intIndex++;
    } while (oQuery.ListItemCollectionPosition != null);
    Oleg
    Hi Oleg, thanks for replying.
    The problem with the code you have is that your SPQuery object's QueryThrottleMode is set to default. If you run that code as a local admin no throttle limits will be applied, but if you're not admin you will still have the normal throttle limits. In my
    situation it won't be run as a local admin so the code you provided won't work. You can simulate my dilemma by setting the QuerryThrottleMode  property to SPQueryThrottleOption.Strict, and I'm sure you'll start to get SPQueryThrottledException's
    as well on that list of 700000+ items.
    Thanks anyway though

  • How to make change in Issue list across all project sites?

    Hi,
    We all have issue list in our project sites. We need to add some values to some of the columns in that issue list. The requirement is we need these changes to reflect in all the new sites. Also how to make these changes reflect in current existing sites.
    Can anybody suggest a way to achieve this. One thing that i am aware of is creating a new project site template and associating it with EPT but that still not solves the issue for preexisting sites.
    Please help asap.
    Thanks in advance.

    Hi SpWrk
    If you have already created some sites. You would need to apply these changes either Programetically (Powershell or C#) or Manually.
    However, you can take the following approach to avoid this problem in future. (i.e. Your "future" changes will appear in existing sites too). I am writing the procedure breifly but let me know if you need more details on this
    1) Create a content type (e.g. "Project issues" at PWA level)
    2) Associate this content type with the Issues List in your site template as well any existing project sites. Make it a default content type for Issue lists. save your site template
    3) Create all your custom columns in this new Content type (changing OOB issue columns can break your reporting)
    4) Your changes to content type should reflect in future sites as well as existing sites (whereever the content type was appiled)
    Regards
    Hammad Arif EPM Advice Blog

  • How to make items in a region populate a parameter in another region

    I have two regions in an APEX page: List of items (hyperlinks) on the left, PL/SQl block containing a media player for videos on the right.
    What I want is for the list to talk to the media player. Click an item in the list and that populates what file is played in the media player.
    I'm very new to APEX and if anyone has an example of this, I would greatly appreciate it.
    Thank you,
    Amy

    On one plage, I have the following region:
    htp.p('
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>play</title>
    </head>
    <body align="left">
    <object id="MediaPlayer1" CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/ en/nsmp2inf.cab#Version=5,1,52,701"
    standby="Loading Microsoft Windows® Media Player components..." TYPE="application/x-oleobject" width="700" height="500">
    <param name="fileName" value="'||VIDEO_NAME||'">
    <param name="animationatStart" value="true">
    <param name="transparentatStart" value="true">
    <param name="autoStart" value="true">
    <param name="showControls" value="true">
    <param name="Volume" value="-20">
    <embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="http://yourdomain.com/play.wmv" name="MediaPlayer1" width=280 height=256 autostart=0 showcontrols=1 volume=-20>
    </object>
    </body>
    </html>
    And a list with the following links in another region: "Video 1" "Video 2" "Video 3" etc
    How do send the URL/value of the lists into the fileName value in the media player?

  • How to make one-option dropdown list partial trigger?

    There are two dependent dropdown lists. when list one is selected, the other one will get the SelectItems according the value of list one. My question is: when there is only one selectiem in list one (and the hint 'Please select one..."), how to make it partial trigger in the second time? e.g. I first login and select the ONLY one choice in List one, and the List two gets the values. but the data in datasource updated, so I want to choose the List one again, and make the List two get the new values.

    Hi,
    create a JSF binding (Bindings property on the list component) to a managed bean. The in the code that would trigger the PPR, call
    AdfFacesContext.getCurrentInstance().addPartialtarget(theListBindingName);
    If you have a refresh button, then you could use declarative PPR
    Frank

  • How to move items from one list to other

    hi all,
    in jsp page i have twolist boxes. i want to move item from one list to other list on click of add or move button. can u plz suggest me an answer for the above. thank u
    Regards sangeet

    This link should help. Remove from one list and add to the other using Javascript.
    http://www.mredkj.com/tutorials/tutorial006.html

  • How to make my applicatio​n programmat​ically switch between English and Russian

    Greetings from Colorado...
    My application needs to be switchable between English and Russian.  Future languages to add are Spanish and Chinese.  The user selects a language
    from a control before starting the program and then the program changes the Captions, Boolean Texts, Graph Labels, and Enum Type Strings to the
    chosen language.  For Russian, this requires a different set of characters.  I have made substantial progress by:
    Control Panels>Region and Language>Keyboards and Languages>Change Keyboards added Russian>Keyboard>Russian on my development
    computer.
    In the LabVIEW.ini file, I added UseUnicode=TRUE (thanks to a suggestion found in this forum)
    Made property nodes for controls and used properties such as Interpret As Unicode (True for Russian, False for English), Text, Font Name, Font Size, etc.
    I have used fonts Arial and Arial CYR for Russian and MS Sans Serif for English
    Set the keyboard for Russian and enter Cyrillic characters into text constants that are set for Arial or Arial CYR font.  Sometimes one works and
    sometimes the other works.  As long as I set the font name in the property node the same way the text went into the text constant, it generally
    works.  I wish I could understand why one works sometimes and the other works other times!
    I have had trouble with the Boolean Text going off-center when changing fonts and languages and it seems that by setting the Lock Text In Center
    property to False and then True again, it seems to work.  Often changing Boolean texts between short and long texts causes some of the long text
    to be non-displayed; I have remedied this by explicitly setting the width of the Boolean text in a property node.
    Often, the Russian text appears as gibberish with strange right-angle characters, :s, =s, and tiny numbers.  I have been able to remedy this on my
    development computer by ensuring that the text constant on the block diagram has the same size as the caption is supposed to have.  This
    is not necessary for normal programming in English, but it seems to help here.  But it doesn't always solve the problem.
    Sometimes the English text appears as Chinese gibberish in an Enum Type selection list or in a graph label.  On my development computer,
    it seems that making the text the last property to change helps here.
    By changing the sequences of assignments to a single property node with a long list of properties, I have been able to make some of these
    controls to switch between languages without gibberish showing up.
    A few hours ago, I had the Russian strings in the Enum Type control working, except that when selecting from the available items, only the first
    word of the Russian string was displayed.  Two of the items start with the same word, so the user can't distinguish them.  
    At that time the English strings were appearing as Chinese gibberish while the list during the selection process displayed in English.  As soon
    as I changed the selection, future attempts to change the selection gave Chinese gibberish during the selection process, too.  But this was only
    a problem in the executable version; the source-code version worked fine.
    In an attempt to get rid of the Chinese gibberish, I made new constants and retyped the items into them.  This worked!  But then, the Russian
    stopped working and gave gibberish angles and tiny numbers, even though I didn't touch any of the code that sets the properties in Russian mode.
    After trying a few sequences of setting the properties for the graph X label on page 2 of my tab control, this label started working correctly for both
    languages.  But the text of that label comes through on page 1 of the tab control, partly obscured by other controls on that page.  After the
    program runs a few more seconds, these shadows disappear.
    Most times I restart LabVIEW, I get an error message saying there was a crash due to fontmgr.cpp, line 7494.  But there actually wasn't a crash.
    My computer has Windows 7 64-bit.  Deployment Computer has Windows 7 32-bit.  LabVIEW version is 8.5.  
    I have probably 50 or 100 more controls and indicators to change to language programmability and figuring out all this stuff for each one is
    terribly time-consuming and there is no assurance that all of them will ever work.  
    At this point, I'm hoping that I am on an entirely wrong path and someone will send me a clue to get me on a path that is more predictable.
    Thanks in advance to all who post ideas!
    Cheers
    Halden 

    Hi All,
    I've made a lot of progress on this translation, but it's been really hard.  There are lots of weird things going on that must be logical because they're in a computer, but I can't figure out what the logic is.  When changing a font on a caption using the front panel, it sometimes changes the font on the caption and sometimes doesn't although the indicator always indicates the new font.  Removing the first character of the unicode font string being sent to the caption seems to help...huh?  Anyway, tabs still can't change language programmatically, and niether can ring controls (some kinds will take the new list of strings, but when selecting, they only display the first word of the string!).  Boolean text can be reprogrammed, but only if the boolean text is set to be the same for both true and false states.  When reprogramming captions on a non-displayed page of a multi-page tab-controlled user interface, the new text appears on the current page until I change pages back and forth.  What a pain!
    Sooo, NI....does LabVIEW 2011 have support for unicode fonts?  Or, is there anything else in the new control style that will support programmatic language changing?
    Halden 

  • How to Make a pdf that can be downloaded, filled in and saved and then emailed; Acrobat 9 Pro; Windows

    Hi,
    I hope this hasn't been asked before, but I really need to figure out how to do this.   We take forms in Word, convert them using the wizard, and then the only way I can figure how to make them fill in able and then saveable is to distribute through email.  This won't work for me, I need to put them on a website so they don't rely on me to get the forms.
    Any help is appreciated.   Here is a link to a state work site here in washington that has exactly what I need. if that help to clarify what I'm talking  about.
    Best, Mary

    Hi Mary,
    I have recently gone through this same experience.
    The first thing is to set the security.
    Go to Advanced/Security/2 Encrypt with password.  On this page go to Permissions and click on Restrict editing.
    You will need to add a password, choose the printing allowed, and changes allowed - this is where you allow the form
    to be filled out.
    When you have finished these steps, click ok.
    Then from the Advaned menu choose "Extend Features in Adobe Reader".  You will see what access the user has to the form.
    Your form should be ready to email or add to a website as a pdf form.
    Hope this helps.
    Debbie

  • How can I move my contact list to new ID account and question about updating iOS

    How can I move my contact list to new ID account?
    And should I update my iOS system ?

    Hello Godde
    Lets start with checking out the articles below for setting up Family Sharing and more information about Apple ID’s. I will say that you will not be able to transfer any purchases to a different Apple ID, but you can rename the Apple ID. If you want to use Family Sharing, then you will need to just create a new iCloud account and then follow the steps in the second article to start sharing content between you to.
    Using your Apple ID for Apple services
    http://support.apple.com/kb/HT4895
    Sharing purchased content with Family Sharing
    http://support.apple.com/kb/HT201085
    Regards,
    -Norm G.

  • Touch3G, ios 5.1.1, how to get rid of "reading List" in the bookmarks section and history file in reading list no longer works.

    Since downloading 5.1.1, my Touch 3G has "Reading List" in the Bookmarks section and the "history" tab no longer shows anything. 
    How do I delete "reading list" in the bookmarks section?  Very disappointed to have this pushed on me without warning. TIA....

    Please can u answer it fast

  • How to make a cell in a JTable to be uneditable and handle events

    I tried many things but failed,How do you make a cell in a JTable to be uneditable and also be able to handle events>Anyone who knows this please help.Thanx

    Hello Klaas2001
    You can add KeyListener ,MouseListener
    Suppose you have set the value of cell using setValueAt()
    table.addKeyListener(this);
    public void keyTyped(KeyEvent src)
    String val="";
    int r= table.getEditingRow();
    int c= table.getEditingColumn();
    val=table.getValueAt(r,c).toString();
    if (r!=-1 && c!=-1)
    TableCellEditor tableCellEditor = table.getCellEditor(r, c);
    tableCellEditor.stopCellEditing();
    table.clearSelection();
    table.setValueAt(val,r,c);
    public void keyReleased(KeyEvent src)
    public void keyPressed(KeyEvent src)
    table.addMouseListener(this);
    public void mouseClicked(MouseEvent e)
    public void mouseEntered(MouseEvent e)
    public void mouseExited(MouseEvent e)
    public void mousePressed(MouseEvent e)
    public void mouseReleased(MouseEvent e)
    if(e.getClickCount()>=2)//Double Click
    table.clearSelection();
    int r= table.getEditingRow();
    int c= table.getEditingColumn();
    if (r!=-1 && c!=-1)
    TableCellEditor tableCellEditor = table.getCellEditor (
    r,c);
    tableCellEditor.stopCellEditing();
    table.clearSelection();
    table.setValueAt("",r,c);
    }//Mouse Released
    You can remove keyListener and Mouse Listener whenever You want to edit
    then add it later.
    Regarding handling events implement javax.swing.event.TableModelListener
    table.getModel().addTableModelListener(this);
    public void tableChanged(javax.swing.event.TableModelEvent source)
    TableModel tabMod = (TableModel)source.getSource();
         switch (source.getType())
    case TableModelEvent.UPDATE:
         break;
         }//Table Changed Method
    //This method gets fired after table cell value is changed.

  • Does anyone know how to make Safari send e-mail? Mine won't and hasn't for some time.

    I have been having trouble for some time sending e-mails by Safari - no problems with Mail - Does anyone know how to make Safari send e-mails?

    When we first got our new iMac we were able to send e-mail through Safari - somewhere in the last 2-3 years it stopped and we got the failure to deliver message. We then sent e-mails through Mail - it works well and we have gotten used to doing this. However, every once in a while I retry send e-mails through Safari and we still get the  failure to deliver notice. This has also happened when we try to forward some e-mails we receive (not all; most get forwarded).

  • How to make item references dynamic in my trigger [SOLVED]

    Hi. I have a Key-List-Item trigger on my form for a date item named bundle_exceptions.actual_dt. This trigger code is displaying a calendar when the user performs a key-list-item action on this date item. Throughout this code there are hardcoded references to my item in two different ways:
    1) :bundle_exceptions.actual_dt
    2) 'bundle_exceptions.actual_dt'
    Since I have multiple date items on my application I would like to know if I can make this code more dynamic. Since the cursor is sitting on the item at the time, I thought I could reference :system.current_block and :system.current_item. But I can't seem to get the syntax correct. And to complicate things, I'm even more confused as to how I could get these system variables to match the two difference ways the item is referenced in the code (see above).
    I would love some help or advice on solving this issue. I really don't like the idea of copying and pasting this code to every date item I have on my form. Thanks in advance.
    ========= CODE =============
    date_lov.get_date (nvl(:bundle_exceptions.actual_dt,sysdate),
    'bundle_exceptions.actual_dt',
    (get_item_property('bundle_exceptions.actual_dt',x_pos) - x_adjust),
    (get_item_property('bundle_exceptions.actual_dt',y_pos) - y_adjust),
    'Calendar',
    'OK',
    'Cancel',
    TRUE,
    FALSE,
    FALSE);

    Here's what I ended up with. I never could get the Name_In and Copy built-ins to compile because of syntax errors. I'm sure this was my own doing...but I just couldn't do it.
    Anyhow, this code is working for me know. Thanks so much for all the input.
    ========= CODE =========
    PROCEDURE Call_Calendar_Popup (for_this_item in varchar2) IS
         y_adjust number := 1.6; -- this is the height of the popup box
         x_adjust number := 1.8; -- this is the width of the popup box
    begin
    -- Depending on whether this proc is called from the item itself (say a key-list-item trigger) or
    -- from another item (say a when-button-pressed trigger) the cursor may first need to be moved to the
    -- item we want to populate from the calendar
    if upper(:system.current_block||'.'||:system.current_item) <> upper(for_this_item) then
         go_item(for_this_item);
    end if;
    -- if the items xpos (horizontal) is closer to the edge than the pop ups width push it over to the right.
    if get_item_property(:system.current_block||'.'||:system.current_item,x_pos) < x_adjust then
         x_adjust := to_number(get_item_property(:system.current_block||'.'||:system.current_item,x_pos));
    end if;
    -- if the items ypos (vertical) is closer to the edge than the pop ups height push it down.
    if get_item_property(:system.current_block||'.'||:system.current_item,y_pos) < y_adjust then
         y_adjust := to_number(get_item_property(:system.current_block||'.'||:system.current_item,y_pos));
    end if ;
    -- popup the calendar so the user can populate the date text-item
    date_lov.get_date (nvl(Name_In(':'||:system.current_block||'.'||:system.current_item),sysdate),
    'bundle_exceptions.actual_dt',
    (get_item_property(:system.current_block||'.'||:system.current_item,x_pos) - x_adjust),
    (get_item_property(:system.current_block||'.'||:system.current_item,y_pos) - y_adjust),
    'Calendar',
    'OK',
    'Cancel',
    TRUE,
    FALSE,
    FALSE);
    end;

Maybe you are looking for

  • GRUB and Solaris 10 installation with WinXP

    Hi All, I am new to Solaris 10 and want to install it on my PC.(Intel81845GVM-RZ Motherboard,256 mb RAM,80gb Hard disk)I am comfortable with installations on Sparc m/c but this GRUB bootloader is all new to me.I am not able to find any good document

  • Problems by printing in background

    Hi experts, we have a problem by printing a smartform. The problem is in authority check of an object. When we run only the print preview, everything is working fine. But when we run the direct print it looks like, that the authority check is skiped.

  • DPS (Andriod devie): Nested overlays are working on other (horizontal) orientation

    Hi, As per the requirement, we have to set multiple overlays on few pages. E.g. if on vertical orientation there is multiplay overlay (scrollable frame in Object State) then on horizontal orientation the button (button to dispaly the object state) do

  • No Mail Print Icon (but Safari and Photo work fine)

    Strange, so maybe you can help. I have an HP Photosmart C7200 printer and am using Printopia to print via 4.2 and AirPrint. This works fine for both Safari and for Photo, but there is no appropriate print icon in Mail. All three support printing so I

  • Query on designing part

    Hi, In my scenario,my IDOC is having several segments.Each segment is having same fields,say FieldA,FieldB. I want to do in mapping in such a way that whenever the value of FieldA is 'Customer',I want to retrieve the corresponding value of FieldB and