By Rosegarden on: 2009-03-12 00:22:29


When titles are too long like the one in " Communication" or "Looking for Options" , "Contact" are being cut off. Also, even if i added 5 supporting link i can just see 3 of them. What should i do to resolve the problem.

http://profiles.zolio.com/private/zolio/8360b8639bdf70d1407fd4b53436de09a08920ec#

By Dave on: 2009-03-12 02:17:40

Titles are not multiline so when long they are cutoff. To resolve it, you need to either decrease the font size or give tooltip on rollover of titles.
For supporting link check that no maxHeight or height should be specified for the component that is displaying links

By Rosegarden on: 2009-03-12 10:06:23

Thanks a lot for your response. Do i need to do it inn CSS or MXML. Also, how i can give tool tip on rollover of titles?

Thanks a lot.

By Rosegarden on: 2009-03-12 22:40:05

My titles are also being cut off in some description box. You can see from the URL http://profiles.zolio.com/private/zolio/e60ed95a5c9925da21bf71f617b056a867f0bb1e#.Look at the "work samples" on the picture from Chicago. Name is being cut off. Below one is the code i wrote to make it multiple line , but nothing change at all. What is being wrong?

Thansk a lot,

<?xml version="1.0" encoding="utf-8"?>
<mx:Box xmlns:mx="http://www.adobe.com/2006/mxml"
styleName="descriptionPopUp"
horizontalScrollPolicy="off"
verticalScrollPolicy="off" >
<mx:Script>
<![CDATA[
import com.zolio.vo.Asset;
import mx.managers.PopUpManager;

[Bindable]
private var _asset:Asset;

override protected function createChildren():void
{
// Create a UITextField to display the label.
if (!nameText)
{
nameText = new UITextField();
nameText.styleName = this;
addChild(nameText);
}
super.createChildren();
nameText.multiline = true;
nameText.wordwrap = true;
}
]]>
</mx:Script>
<mx:TextArea id="nameText"
wordWrap="true" fontWeight="bold" textAlign="left"
fontAntiAliasType="advanced" paddingBottom="2" width="100%" maxChars="300" minHeight="5" maxHeight="10" minWidth="230" maxWidth="250"/>
<mx:TextArea id="descriptionText"
width="100%" horizontalScrollPolicy="off" verticalScrollPolicy="off"
paddingTop="0" paddingBottom="0" paddingLeft="0" paddingRight="0" backgroundAlpha="0" alpha="100" borderStyle="none"
textAlign="left" wordWrap="true" editable="false" selectable="false" fontSize="9" fontWeight="bold" maxChars="600"/>
</mx:Box>

By Rosegarden on: 2009-03-12 22:54:16

Also, I have another question for the answer "Titles are not multiline so when long they are cutoff. To resolve it, you need to either decrease the font size or give tooltip on rollover of titles." I am not the one writing the titles. Users are writing the title. Can i still give a tool tip? Do you think is it better to make it multiline.

By Rosegarden on: 2009-03-13 00:50:08

Hi Dave,

There is no max height or height for the Links Panel. Below one is the code as you can see there is no height property. What should i do?
Thanks a lot.

Rosegarden,

<?xml version="1.0" encoding="utf-8"?>
<mx:Box
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:sidebar="com.zolio.view.sidebar.*">

<mx:Script>
<![CDATA[
import com.zolio.model.ResumeDisplayModelLocator;
import com.zolio.vo.Zolio;

[Bindable]
private var _model : ResumeDisplayModelLocator = ResumeDisplayModelLocator.getInstance ();
]]>
</mx:Script>

<mx:Label
styleName="linksTitle"
text="{ResumeDisplayModelLocator.getString ( 'sidebar.links.label' )}" />

<mx:Repeater id="links"
dataProvider="{_model.zolio.linksCollection}">

<sidebar:LinksLinkButton
link="{links.currentItem as Link}" maxWidth="210" />

</mx:Repeater>

</mx:Box>

By Dave on: 2009-03-13 09:10:40

To make multiline : "work samples". Name field . replace your tag by this tag :
<mx:TextArea id="nameText" wordWrap="true" fontWeight="bold" textAlign="left" fontAntiAliasType="advanced" paddingBottom="2" width="100%" maxChars="300" minHeight="5" horizontalScrollPolicy="off" verticalScrollPolicy="off" minWidth="230" maxWidth="250" updateComplete="{nameText.height=nameText.textHeight+7;}"/>

By Dave on: 2009-03-13 09:17:35

Regarding you Link panel height property try giving height to box tag like : <mx:Box height="100%"> of your above code

By Rosegarden on: 2009-03-13 13:02:49

Thanks a lot. I appreciate.

By Rosegarden on: 2009-03-13 14:24:03

I think there is a problem in my system. System does not let me to test.That is why; when i changed the coding it does not affect anything, everything looks same. Just for the test purposes i give a color red to the mx:TextArea and it was not red. I believe the code you send to me would resolve my problem.But i just cannot test it. I do not know what is wrong in my system.

By Dave on: 2009-03-14 02:15:24

override protected function createChildren():void
{
// Create a UITextField to display the label.
if (!nameText)
{
nameText = new UITextField();
nameText.styleName = this;
addChild(nameText);
}
super.createChildren();
nameText.multiline = true;
nameText.wordwrap = true;
}

Is this method required ? i think it can be removed u have already created textarea in mxml, may be the cause of problem .Also delete the main swf and see if its being created again.

By Rosegarden on: 2009-03-14 16:38:35

This method id not required.It was the coding i added later to make the title multiline. I did removed it already, and just add the code you send to me. I really do not know why nothing is changing. Also, as i told before i tried to change the colors to see if it will change the font color , but it did not. Also, i changed the font weight by making it bold and it did not become bold either.

By Dave on: 2009-03-15 01:52:51

are you sure this is the right textbox u want to change ? try giving bigger font size to see if is changing.

By Rosegarden on: 2009-03-15 23:29:13

I believe it is the right box i wanna change , because there are no other box with name and description inside of it. However, i tried to change the font size , and it did not change anything. It was all same. I really cannot understand what is being wrong. Do you think that there is smt wrong with my flex builder?

By Rosegarden on: 2009-03-15 23:51:28

I have pasted the code, and the URL it is showing the box. I believe it is the right box.
http://profiles.zolio.com/private/zolio/e60ed95a5c9925da21bf71f617b056a867f0bb1e#. If you look at the name in the picture of Chicago. It is being cut off, and it is not two line. Thanks

<?xml version="1.0" encoding="utf-8"?>
<mx:Box xmlns:mx="http://www.adobe.com/2006/mxml"
styleName="descriptionPopUp"
horizontalScrollPolicy="off"
verticalScrollPolicy="off" >
<mx:Script>
<![CDATA[
import com.zolio.vo.Asset;
import mx.managers.PopUpManager;

[Bindable]
private var _asset:Asset;
]]>
</mx:Script>

<mx:Label id="nameText"
paddingTop="0" paddingBottom="0" paddingLeft="0" paddingRight="0"
textAlign="left" maxHeight="25" wordWrap="true" maxChars="300" horizontalScrollPolicy="off" verticalScrollPolicy="off"
width="100%" fontAntiAliasType="advanced" fontweight="bold" fontSize="20"
updateComplete="{nameText.height=nameText.textHeight+7;}"/>

<mx:TextArea id="descriptionText"
width="100%" horizontalScrollPolicy="off" verticalScrollPolicy="off"
paddingTop="0" paddingBottom="0" paddingLeft="0" paddingRight="0" backgroundAlpha="0" alpha="100" borderStyle="none"
textAlign="left" wordWrap="true" editable="false" selectable="false" fontSize="9" fontWeight="bold" maxChars="600"/>
</mx:Box>

By Dave on: 2009-03-16 02:06:33

If your project is having errors its not compiled by flex, so no updat will be shown until u fix errors.To see problems check your problems window in flex builder.

<mx:Label id="nameText"
paddingTop="0" paddingBottom="0" paddingLeft="0" paddingRight="0"
textAlign="left" maxHeight="25" wordWrap="true" maxChars="300" horizontalScrollPolicy="off" verticalScrollPolicy="off"
width="100%" fontAntiAliasType="advanced" fontweight="bold" fontSize="20"
updateComplete="{nameText.height=nameText.textHeight+7;}"/>

Above tag will give u errors since many properties inside are not that of label.Use it as textarea like this :

<mx:Label id="nameText"
paddingTop="0" paddingBottom="0" paddingLeft="0" paddingRight="0"
textAlign="left" maxHeight="25" wordWrap="true" maxChars="300" horizontalScrollPolicy="off" verticalScrollPolicy="off"
width="100%" fontAntiAliasType="advanced" fontweight="bold" fontSize="20"
updateComplete="{nameText.height=nameText.textHeight+7;}"/>


IF still not updating after removing all errors. then clean ur project from Project Menu in Flex Builder

By Rosegarden on: 2009-03-16 03:10:59

<?xml version="1.0" encoding="utf-8"?>
<mx:Box xmlns:mx="http://www.adobe.com/2006/mxml"
styleName="descriptionPopUp"
horizontalScrollPolicy="off"
verticalScrollPolicy="off">
<mx:Script>
<![CDATA[
import com.zolio.vo.Asset;
import mx.managers.PopUpManager;

[Bindable]
private var _asset:Asset;
]]>
</mx:Script>

<mx:Label id="nameText"
paddingTop="0" paddingBottom="0" paddingLeft="0" paddingRight="0"
textAlign="left" maxHeight="15" />
<mx:TextArea id="descriptionText"
width="100%" horizontalScrollPolicy="off" verticalScrollPolicy="off"
paddingTop="0" paddingBottom="0" paddingLeft="0" paddingRight="0" backgroundAlpha="0" alpha="100" borderStyle="none"
textAlign="left" wordWrap="true" editable="false" selectable="false" fontSize="9"/>
</mx:Box>

Actually, the above one is the code. I played a lot with it. If i just add updateComplete="{nameText.height=nameText.textHeight+7;}"/>
to mx:label, my name is going to show 2 lines and won't be cut off anymore?

Thanks,

By Dave on: 2009-03-16 03:21:58

oh my mistake the tag label needs to be replaced by textarea because all these properties are of textarea and not of label. it should work .
<mx:TextArea id="nameText" wordWrap="true" fontWeight="bold" textAlign="left" fontAntiAliasType="advanced" paddingBottom="2" width="100%" maxChars="300" minHeight="5" horizontalScrollPolicy="off" verticalScrollPolicy="off" minWidth="230" maxWidth="250" updateComplete="{nameText.height=nameText.textHeight+7;}"/>

By Rosegarden on: 2009-03-16 15:00:29

Hi Dave,

I think the best thing to do just copy and paste all the properties in the id="descriptionText" since it works perfectly and becomes two lines, and also i will add updateComplete="{nameText.height=nameText.textHeight+7;}"/>. Do i need to do the same thing to the titles in " Communication" or "Looking for Options" , "Contact" as you can see in the URL http://profiles.zolio.com/private/zolio/8360b8639bdf70d1407fd4b53436de09a08920ec# as you can see they are all cut off when they are too long. I cannot add tooltip because i am not the one typing the values users enter those values , and then they are being rendered to the profile. Thanks

Rosegarden

By Dave on: 2009-03-17 02:38:07

1)yes u can make it multiline.

2)or add tooltip using this event :updateComplete="{nameText.toolTip=nameText.text;}"
this will display full title when mouse over titles like "Communication" it wont work for image discription title since its already tooltip kind.

3)Also u can limit the title lenght where user types title so that user do not enter large text in titles.

By Rosegarden on: 2009-03-17 12:34:55

Thanks a lot.

Rosegarden

By Rosegarden on: 2009-03-17 15:07:02

Hi Dave,

I was just trying to do my titles multiline in "Communication", "Looking for" and " Contact" and i was wondering what is the best way of doing so. Should i use "updateComplete="{nameText.height=nameText.textHeight+7;}"/> or the below method.

Thanks

override protected function createChildren():void
{
// Create a UITextField to display the label.
if (!nameText)
{
nameText = new UITextField();
nameText.styleName = this;
addChild(nameText);
}
super.createChildren();
nameText.multiline = true;
nameText.wordwrap = true;
}

Rosegarden

By Dave on: 2009-03-18 08:04:04

well :) both are ok as far as they serve your purpose.


Ads

This website focus on: Flash | Flex | FMS | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem,Flash Help,Flash bugs,Flash workaround | Flash Blog | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright � 2008 askMeFlash.com. All rights reserved