Thanks for reply Alex,
I have many custom features besides multiline text so i have created custom
renderer for it.
I dont need wordwrap here and text is not multilines by wordwrap=true.
Actually I am concatenating 3 different values seperated by "\n" in
labelFunction thats why i have used textData.text =
gdeColumn.itemToLabel(value); in set data function.
I applied your changes by assuming textData.validateClient(true) is
misspelled and it is textData.validateSize(true) then cell is showing only
single line data. I didnt find validateClient() in property? please let me
know
in measure function in custom renderer, Do we always have to call
super.measure at last?
please let me know
Alex Harui wrote:
>
> It looks like the textData is supposed to cover the full width of the
> renderer so I’m not sure why you need a custom renderer at all given the
> default one handles multi-line just fine.
>
> However, in principle, a custom renderer should always factor
> explicitWidth in the measure() calculations. This is especially important
> for word-wrapping text because the text’s height depends on its width.
> In your case it might look something like this:
>
> override protected function measure():void
> {
> textData.width = explicitWidth;
> textData.validateClient(true);
>
> super.measure();
>
> // probably not needed if textData and its container will now compute the
> right height.
> //measuredHeight =
> textData.textHeight+2+2;//getExplicitOrMeasuredHeight has some problem
>
> }
>
>
> Then your updateDisplayList should simply layout within the given
> dimensions.
>
>
> On 6/10/10 7:21 AM, "DevSachin" <[email protected]> wrote:
>
>
>
>
>
>
>
> I have some problem if i do
> textData.setActualSize(w,textData.textHeight+2+2); into measure function
> then row height is not working proper. I am using master-Detail
> grid(double
> grid) concept and using custom renderer on inner grid.
>
> DevSachin wrote:
>>
>> Hi Alex,
>> Thanks alot for quick reply.
>> I know we can not stop recycling. My question was how to solve row height
>> issue that is cause by recycling renderer?
>>
>> Now i have changed the measure() function as you said and didnot faced
>> row
>> height recycling issue yet. I am still testing it,
>> Query :please let me know if i need to do any more changes to increase
>> performance:
>> override protected function measure():void
>> {
>> super.measure();
>> width = this.getExplicitOrMeasuredWidth();
>> measuredHeight = textData.getExplicitOrMeasuredHeight();//
>> textData.textHeight+2+2;
>>
>> }
>>
>>
>>
>>
>
> --
> Alex Harui
> Flex SDK Team
> Adobe System, Inc.
> http://blogs.adobe.com/aharui
>
>
--
View this message in context:
http://old.nabble.com/Recycling-height-issue-in-custom-item-renderer-tp28831427p28854860.html
Sent from the FlexCoders mailing list archive at Nabble.com.