?
Solved

Flex 3 labels coming out like this "Labe...."  So reason for dots

Posted on 2009-12-17
8
Medium Priority
?
940 Views
Last Modified: 2012-05-08
I have several Flex 3 applications that I am trying to scale to meet different resolutions.  I have often noticed that a label will read like this "Labe....."  Even thought that is taking up more space than the label itself would.  And often when I mouse over the label it shows the whole thing.  Does anyone know a fix for this.. It is very unsightly
0
Comment
Question by:jeresimpson
  • 4
  • 3
8 Comments
 
LVL 35

Expert Comment

by:torimar
ID: 26077486
If text is too long to fit a fixed width label, it will be truncated. And if the "truncate-to-fit" property of the label is set to 'true', the text will be shortened and 3 dots displayed.
Set this property to 'false' if you don't want the dots.

0
 

Author Comment

by:jeresimpson
ID: 26077675
What tag has this "trucate-to-fit" attribute?  

Thanks!
0
 

Author Comment

by:jeresimpson
ID: 26077766
To be more clear.  I have a viewstack.. inside that viewstack I have canvas's with labels.  I see that the label tag has that attribute.  But I can't use it in <mx:Canvas label="TheLabel" >
I can make it a child tag, but it doesn't seem to show the label.  I must be doing something wrong.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 11

Expert Comment

by:vindys80
ID: 26077922
Hi,

label of viewstack and canvas is for showing in containers. For example if its in tabNavigator or show, it will show the label on tabs.

http://www.adobe.com/livedocs/flex/3/langref/mx/core/Container.html#label

http://www.adobe.com/devnet/flex/quickstart/using_containers/

I think you can try using width of the components as 100% to avoid getting "..."
0
 

Author Comment

by:jeresimpson
ID: 26078019
Thank you.  Yes, I am using a viewstack and wanting the labels to populate a linkbar.  All the components associated with the labels are 100% width.  I also have buttons that have this same problem at times.  

I notice this behavior in tabs of a tabnavigator, it often seems needless.
0
 
LVL 11

Expert Comment

by:vindys80
ID: 26078032
Hi,

Can you post the code?

Thanks,
Vindys
0
 

Author Comment

by:jeresimpson
ID: 26078046
Sample code would include:

<mx:LinkBar    id="MyLinkBar" dataProvider="VS1" fontWeight="bold" themeColor="#80ff80" alpha="1" backgroundAlpha="0" fontSize="12" width="100%" horizontalAlign="center" verticalGap="0" selectionColor="#6FB7FF" textRollOverColor="#0000FF" buttonMode="true" textSelectedColor="#80FF80" color="#ffffff" separatorWidth="0" disabledColor="#80FF80" textAlign="left">
   
</mx:LinkBar>
<mx:ViewStack    id="VS1"   width="100%" height="100%"  fontSize="20"  textAlign="center" historyManagementEnabled="true" borderStyle="none" alpha="1.0" backgroundAlpha="0" backgroundColor="#EAEAEA">

    <mx:Canvas  label="HOME"  ......
0
 
LVL 11

Accepted Solution

by:
vindys80 earned 2000 total points
ID: 26078098
Hi,

I tried with your code in my application and its fine.
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white" xmlns:local="*">


    <mx:LinkBar    id="MyLinkBar" dataProvider="myViewStack" fontWeight="bold" themeColor="#80ff80" 
    	alpha="1" backgroundAlpha="0" fontSize="12" width="100%" horizontalAlign="center" verticalGap="0" 
    	selectionColor="#6FB7FF" textRollOverColor="#0000FF" buttonMode="true" textSelectedColor="#80FF80" 
    	color="#ffffff" separatorWidth="0" disabledColor="#80FF80" textAlign="left">
    
	</mx:LinkBar>
    <mx:ViewStack    id="myViewStack"   width="100%" height="100%"  fontSize="20"  textAlign="center" 
    	historyManagementEnabled="true" borderStyle="none" alpha="1.0" backgroundAlpha="0" 
    	backgroundColor="#EAEAEA">
            <mx:Canvas label="To be more clear.  I have a viewstack.. inside that viewstack I have canvas's with labels.  I see that the label tag has that attribute.  But I can't use it in" width="100%" height="100%">
                <mx:Label x="10" y="10" text="Contents 1"/>
            </mx:Canvas>
            <mx:Canvas label="To be more clear.  I have a viewstack.. inside that viewstack I have canvas's with labels.  I see that the label tag has that attribute.  But I can't use it in" width="100%" height="100%">
                <mx:Label x="10" y="10" text="Contents 2"/>
            </mx:Canvas>
            <mx:Canvas label="To be more clear.  I have a viewstack.. inside that viewstack I have canvas's with labels.  I see that the label tag has that attribute.  But I can't use it in" width="100%" height="100%">
                <mx:Label x="10" y="10" text="Contents 3"/>
            </mx:Canvas>
        </mx:ViewStack>

</mx:Application>

Open in new window

0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
Strategic internal linking is often considered an SEO power technique, especially for content marketing. Do you need to hire an SEO agency to optimize you internal linking? No, this article will help you understand the basics of internal linking and…
Screencast - Getting to Know the Pipeline
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question