Multiline label

The labels for my formItems are sometimes too long for one
line, and pointing to the label to see a tooltip display the full
title is insufficient for my client's requirements. There is room
on the stage for the label to wrap over two lines, but according to
docs labels does not support multiline.
i've considered two solutions to this, both of which i would
prefer to avoid:
1. creating my own custom formitem component from scratch
with a multiline text control.
2. coloring the label in the formItem the same color as the
background and absolutely positioning a multiline text control
where the label should be (time is short!)
can anyone think of a simpler way around this problem?
cheers
Craig

Unfortunately, FormItem's label is just that, a Label. And
Labels are not multi-line. But FormItem's actually use
FormItemLabel, not Label directly. So you can write your own
FormItemLabel and extend it from Text, not Label.
1. create the package mx.controls in YOUR application path.
2. create FormItemLabel.as in that package. Extend Text.
3. Override the protected function measure(), call
super.measure(), then adjust measuredWidth and measuredHeight.
You'll have to experiment in the measure() function to get
those values correct. The alternative is to explictly size the
FormItem which is probably your best bet for accuracy.
By placing mx.controls.FormItemLabel in your application
path, the Flash Player will load your FormitemLabel first and
ignore the one in the frameworks.swc.
Disclaimer: I haven't tried this myself (it should work,
though). And if you break Flex, well, you'll have to go with plan
B.

Similar Messages

  • Flex mobile 4.5 - Multiline Labels?

    Hey, not very sure how to make multiline labels. Is this easily done? Tried to give standard labels height but that doesnt seem to work. In most other languages theres usually a multiline=true kinda dealy but im not sure how to do it in flex. Thanks!

    Look at the answers here: http://stackoverflow.com/questions/6478979/multiline-labels-in-flex-4-5-mobile-apps
    My answer:
    Instead of a label, can you use a StyleableTextField?  If so, just set the wordWrap property to true.

  • Multiline labels in the radio button component

    How can I have multiline labels on my radio button
    components? I can't seem to find good documentation anywhere on how
    to do this. This is the best that I have found:
    http://board.flashkit.com/board/archive/index.php/t-299514.html
    but the process doesn't work for me with Flash CS3.
    Thanks,
    nixxxxx

    Unfortunately seems like you cant do that with radio component. You may just create a textField and place it next to the radio component as a workaround, or, use AS3 which is much easier.

  • Learning interactions: are multiline labels possible?

    Does anyone know how to set a learning interaction checkbox
    label to multiline?

    that's not supported:
    http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Liv eDocs_Parts&file=00002613.html

  • How to? multiline label containing exact system command output

    Background info: I'm triggering a system command to display memory utilization. As you know, the "free" linux command displays many lines of text one after the other. It is similar to the mem command used in Window$.
    I want to have a label displaying the command output as it is: multiple lines. Just like you see it in the console. I want to mirror whatever comes up on console after executing free from java.
    Using html tags won't work out for me in this particular situation. It just doesn't do the trick. Still displays the LAST line of command output with or without html tags.
    any ideas? it doesn't have to be a label. It can be anything as long as it works.
    Again, as it is, it just displays the last line of the command output
    //events will trigger every second
    Timer t = new Timer(1000, new ActionListener(){
          public void actionPerformed(ActionEvent event)
    //determine memory utilization.
            String cmd = "free -m";
        try {
         String line;
         Process p = Runtime.getRuntime().exec(cmd);
         BufferedReader input =
           new BufferedReader
             (new InputStreamReader(p.getInputStream()));
         while ((line = input.readLine()) != null) {
           label.setText(line);
         input.close();
        catch (Exception err) {
         err.printStackTrace();
        t.start();

    got it. thanks.
    String cmdMem = "free -m -t -o" ;
          try {
            String lineMem ;
            String outputMem = "" ;
            Process procMem = Runtime.getRuntime ().exec ( cmdMem ) ;
            BufferedReader input =
                new BufferedReader
                ( new InputStreamReader ( procMem.getInputStream () ) ) ;
            while ( ( lineMem = input.readLine () ) != null ) {
              outputMem = ( lineMem + "\n" ) ;
              jTextAreaSystemResourcesOutput.append ( outputMem ) ;
            input.close () ;
          catch ( Exception err ) {
            err.printStackTrace () ;
          }

  • Custom Label on Session Saved Screen

    Hi ,
    We are trying to show a custom label in Web Determinations after the Session is saved. We are facing two issues :-
    1. How to display a long(2-3 lines) label. Currently the text to the label “case-save-label” gets truncated if it is more than one line long.
    2. How to remove or make blank “RestoreCaselabelInfoMessage” label. Making it blank under the properties file throws an error on Save click on WD.
    Thanks,
    Jas

    Jasminder wrote:
    1. How to display a long(2-3 lines) label. Currently the text to the label “case-save-label” gets truncated if it is more than one line long.Jas,
    You are probably running into the height of the div element where you are trying to display the multiline label.
    My guess is that you are trying to display it in the "menu" div. If you look at the main.vm.css you will see that the height for the class "menu" is fixed to "1.2em". You can try removing or specifying a new height and you should be able to get more room to display.
    In general if formatting rules like height or width can be found in this style sheet file.
    Jasminder wrote:
    2. How to remove or make blank “RestoreCaselabelInfoMessage” label. Making it blank under the properties file throws an error on Save click on WD.You almost certainly can't set this to blank without throwing an error message.
    Cheers
    Frank

  • Multiline checkbox / radio button component

    We're now up to Flash version 8 and we still don't have a
    multiline checkbox / radio button component. Has anyone either:
    a. Figured out how to add a multiline text label to the
    existing Flash components; or
    b. Found a third party component that has multiline labels.
    I'm a developer for an eLearning company, so we use these
    components all the time; so having this would be a huge plus.
    Frankly, it's simply beyond me why Macromedia...er...Adobe hasn't
    upgraded their components to have this feature. It seems like it
    wouldn't be a big thing.
    Anyway, any help you can provide would be most welcome.
    Cheers,
    Adam

    Hopefully this might help.
    http://livedocs.adobe.com/flash/mx2004/main_7_2/00002108.html

  • Checkbox label

    Hi,
    I have a simple question for you. I have a chexbox with a
    large label and I want to do a word wrap with it because when I
    play with the X and Y property, the label is still on one lagre
    line instead of multiple small lines.
    Thanks!

    I dunno if that would be possible but you could build a
    custom component which is a Text and a Checkbox component. Text is
    a multiline label.
    It's the only thing i can think about to solve it

  • TileList custom label

    I am using the tileList component to make xml driven
    thumbnails for the FLVplayback component and I want to make it so
    the labels only show up over the image on mouseover. I also want
    the label background to slide down from top to bottom, similar to
    http://www.commonskymedia.com/index.html#reel4.
    Any thoughts on how i can do this. I am pretty new to Actionscript
    3 so please explain in as much detail as possible. Thanks!

    Jasminder wrote:
    1. How to display a long(2-3 lines) label. Currently the text to the label “case-save-label” gets truncated if it is more than one line long.Jas,
    You are probably running into the height of the div element where you are trying to display the multiline label.
    My guess is that you are trying to display it in the "menu" div. If you look at the main.vm.css you will see that the height for the class "menu" is fixed to "1.2em". You can try removing or specifying a new height and you should be able to get more room to display.
    In general if formatting rules like height or width can be found in this style sheet file.
    Jasminder wrote:
    2. How to remove or make blank “RestoreCaselabelInfoMessage” label. Making it blank under the properties file throws an error on Save click on WD.You almost certainly can't set this to blank without throwing an error message.
    Cheers
    Frank

  • Want to show the special characters in the tab page title.

    Hi,
    I am using oracle 10g forms developer and i have created the x bar chart.
    I want to give the tab page title of the x bar chart as
    x chart
    is it possible or any pjc available?
    Pls help me.
    Balaji
    Edited by: Balaji.M on Nov 15, 2008 3:54 PM

    ok, what is the special character, is the undescore above the x ?
    With standard-forms it's not possible to put multiline-labels on a tab-page. To have a look at the pjc-opportunities, i would start with Francois pjc-site:
    http://forms.pjc.bean.over-blog.com/

  • Detect if text was clipped

    Hi!
    When we set lineBreak to explicit in a multiline label, is there any way to check if the text was clipped or extends past the right edge?
    Thanks

    Spark label.
    Where can I find the function that breaks the string in multiple text blocks? Is there any var that has info how the text was breaked: which text is in every line?
    Thanks.
    Message was edited by: luisborlido

  • A pretty sad question.

    Hi, I'm getting back into Java programming after a while off and I've had some difficulties, and I just can't seem to find a couple of answers to a couple of very basic questions. I'm actually somewhat embarrassed about asking, but I must.
    In application programming, what is the code to make your contentpane be placed in a different location or sector? As in, I don't want the program to pop up in the upper left hand corner anymore.
    Secondly, and this one is far worse. Is it possible to have a multilined Label? I can't seem to make it work with char(13) or \n.
    Thank you for your help.

    Sorry for the double post, but I figured this might
    help.
    I am using getContentPane() and adding panels to it.
    I use the setLocation() on the getContentPane() with
    h no success. Should I connect the setLocation() to
    something else?to the Frame !
    I always use some method like that :
    public class MyFrame extends JFrame {
        protected void centerFrame() {
            Toolkit toolkit = Toolkit.getDefaultToolkit();
            Dimension screenSize = toolkit.getScreenSize();
            int xAnchor = (screenSize.width - getWidth()) / 2;
            int yAnchor = (screenSize.height - getHeight()) / 2;
            setLocation(xAnchor, yAnchor);
    }

  • How to set the default text in an input box or a label to be a predefine, multiline text

    how to set the default text in an input box or a label to be a predefine, multiline text. In other words how to break the line in the code of a text box.
    thank you

    There are a couple of ways of doing this:
    If you're editing on the canvas, press Shift + Enter.
    If you're working in Express View (see lower right hand corner of Project Siena), you'll need to copy a hard return from another app such as Notepad.
    I believe a better implementation of hard returns are in the list of requested functionality that you can find here:
    https://social.technet.microsoft.com/Forums/en-US/2e1f9446-56b2-419a-9c17-7037d2cd6146/from-the-community-overview-of-requested-additional-functionality?forum=projectsiena
    Thor

  • Multiline(Text should be wrapped) in a Label

    How do we put a Multilined (Text should be wrapped here) in a AWT Label.

    JLabels support HTML content, so just put what you want in html and use <br> (or
    if you're using xhtml) and the text will be as you format it.
    eg.
    JLabel label = new JLabel("<html>... blah.<br>blah...</html>");Hope this helps,
    Stef

  • How to make a label multiline

    I have a long label name. How can I make it to appear on 2 lines ?
    Thanks

    Put the <BR> HTML tag in the Tab title. It worked in most areas, but I didn't get it to work on one of the Reports (sorry, I don't remember which one)

Maybe you are looking for