Try not using % widths.  Use left,top,right,bottom as needed.

On 7/12/13 1:24 PM, "mark goldin" <[email protected]> wrote:

>Simplified a bit:
><?xml version="1.0" encoding="utf-8"?>
><s:GridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009";
>  xmlns:s="library://ns.adobe.com/flex/spark"
>  xmlns:mx="library://ns.adobe.com/flex/mx"
>  xmlns:gridEditorClasses="spark.components.gridEditorClasses.*"
>  xmlns:ns="library://commons.stoneriver.com"
>  >
> <fx:Script>
><![CDATA[
>override public function prepare(hasBeenRecycled:Boolean):void
>{
>super.prepare(hasBeenRecycled);
>if (data)
>{
>Question.height = 48;
>Question.width = column.width;
>}
>else
>{
>Question.height = 24;
>}
>}
>}
>]]>
></fx:Script>
> <!--- The renderer's visual component. -->
><s:VGroup width="100%" gap="0">
><s:RichEditableText id="Question" verticalAlign="top" height="100%"
>paddingTop="10" paddingBottom="10" width="100%"
>editable="false" unfocusedTextSelectionColor="red" minWidth="0"
>multiline="true"
>fontSize="{column.grid.dataGrid.getStyle('fontSize')}" paddingLeft="10"
>selectionHighlighting="always"/>
></s:VGroup>
></s:GridItemRenderer>
>
>
>
>On Fri, Jul 12, 2013 at 3:13 PM, Alex Harui <[email protected]> wrote:
>
>> Smells like some other code is setting percentWidth to 100.  Can you
>>post
>> a small test case?  Or at least the full renderer?
>>
>> On 7/12/13 12:18 PM, "mark goldin" <[email protected]> wrote:
>>
>> >Basically, something like this:
>> >override public function prepare(hasBeenRecycled:Boolean):void
>> >{
>> >super.prepare(hasBeenRecycled);
>> >if (data)
>> >{
>> >Question.width = column.width;
>> >}
>> >}
>> >where Question is RichEditableText.
>> >
>> >
>> >On Fri, Jul 12, 2013 at 2:14 PM, Alex Harui <[email protected]> wrote:
>> >
>> >> How are you setting the width?  I suspect that when the column gets
>> >> resized the width gets set.
>> >>
>> >> On 7/12/13 12:05 PM, "mark goldin" <[email protected]> wrote:
>> >>
>> >> >Well, it's not wrapping. But as soon as I resize the column the text
>> >>gets
>> >> >wrapped.
>> >> >
>> >> >
>> >> >On Fri, Jul 12, 2013 at 1:56 PM, Alex Harui <[email protected]>
>>wrote:
>> >> >
>> >> >> You may need to set the width to the width of the column.
>> >> >>
>> >> >> On 7/12/13 11:29 AM, "mark goldin" <[email protected]> wrote:
>> >> >>
>> >> >> >Yeah, that's what I am getting into. But I am having a problem
>>with
>> >> >> >using RichEditableText.
>> >> >> >I want to change its height to make a datagird more compact. But
>>as
>> >> >>soon
>> >> >> >as
>> >> >> >I change the height I am losing word wrapping.
>> >> >> >The only time the word wrapping is working is when a height is
>>set
>> >>to
>> >> >> >100%.
>> >> >> >But then DG has very large rows.
>> >> >> >Any idea?
>> >> >> >
>> >> >> >Thanks
>> >> >> >
>> >> >> >
>> >> >> >On Fri, Jul 12, 2013 at 1:21 PM, Alex Harui <[email protected]>
>> >>wrote:
>> >> >> >
>> >> >> >> Someone recently pointed out that the minimum text widget that
>> >>shows
>> >> >> >> selection is RichEditableText which is relatively heavy.  I
>>think
>> >> >>you'll
>> >> >> >> have to start there.
>> >> >> >>
>> >> >> >> On 7/12/13 11:18 AM, "mark goldin" <[email protected]>
>>wrote:
>> >> >> >>
>> >> >> >> >Spark
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >On Fri, Jul 12, 2013 at 1:14 PM, Alex Harui <[email protected]>
>> >> >>wrote:
>> >> >> >> >
>> >> >> >> >> Spark or MX DataGrid?
>> >> >> >> >>
>> >> >> >> >> On 7/12/13 8:47 AM, "mark goldin" <[email protected]>
>> >>wrote:
>> >> >> >> >>
>> >> >> >> >> >I have a datagrid where in one of columns I need to be
>>able to
>> >> >> >>search
>> >> >> >> >>and
>> >> >> >> >> >highlight instances of text. What is the best item renderer
>> >>for
>> >> >>that
>> >> >> >> >>might
>> >> >> >> >> >be?
>> >> >> >> >> >
>> >> >> >> >> >Thanks
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>>
>>

Reply via email to