You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by mark goldin <ma...@gmail.com> on 2013/07/12 17:47:15 UTC

Idea for item renderer

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

Re: Idea for item renderer

Posted by mark goldin <ma...@gmail.com>.
Not sure I understand how is your code any different than mine and why
setting up a height would work with word wrapping properly. Can you please
tell me what exactly is different?


On Fri, Jul 12, 2013 at 9:12 PM, jude <fl...@gmail.com> wrote:

> Bottom is a style constraint. Try this,
>
>     <s:DataGrid id="grid"
>                 width="500"
>                 height="500"
>                 dataProvider="{testdata}"
>                 variableRowHeight="true">
>         <s:columns>
>             <s:ArrayList>
>             <s:GridColumn width="{grid.width-2}">
>                 <s:itemRenderer>
>                     <fx:Component>
>                         <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"
>                           width="100%"
>                           >
>                          <fx:Script>
>                         <![CDATA[
>                         override public function
> prepare(hasBeenRecycled:Boolean):void {
>                             super.prepare(hasBeenRecycled);
>                             trace("Prepare");
>                             if (data) {
>                                 questionText.height = 48;
>                                 //questionText.width = column.width;
>                             }
>                             else {
>                                 questionText.height = 24;
>                             }
>                         }
>
>                             override public function set
> data(value:Object):void {
>                                 trace("set data");
>                                 super.data = value;
>                                 questionText.text = String(data);
>
>                             }
>
>                         ]]>
>                         </fx:Script>
>                         <s:layout>
>                             <s:VerticalLayout gap="1"/>
>                         </s:layout>
>
>                          <!--- The renderer's visual component. -->
>                         <s:RichEditableText id="questionText"
>                                             verticalAlign="top"
>                                             paddingTop="10"
>                                             paddingBottom="10"
>                                             width="100%"
>                                             editable="false"
>
> unfocusedTextSelectionColor="red"
>                                             minWidth="0"
>                                             multiline="true"
>                                             paddingLeft="10"
>
> selectionHighlighting="always"/>
>                         </s:GridItemRenderer>
>                     </fx:Component>
>                 </s:itemRenderer>
>             </s:GridColumn>
>             </s:ArrayList>
>         </s:columns>
>     </s:DataGrid>
>
>
>
> On Fri, Jul 12, 2013 at 8:38 PM, mark goldin <ma...@gmail.com>
> wrote:
>
> > Bottom of what?
> >
> >
> > On Fri, Jul 12, 2013 at 8:08 PM, Alex Harui <ah...@adobe.com> wrote:
> >
> > > Try using bottom.
> > >
> > > On 7/12/13 5:09 PM, "mark goldin" <ma...@gmail.com> wrote:
> > >
> > > >But if I need to specify height what do I do?
> > > >
> > > >
> > > >On Fri, Jul 12, 2013 at 5:37 PM, Alex Harui <ah...@adobe.com> wrote:
> > > >
> > > >> Try not using % widths.  Use left,top,right,bottom as needed.
> > > >>
> > > >> On 7/12/13 1:24 PM, "mark goldin" <ma...@gmail.com> 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 <ah...@adobe.com>
> > 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" <ma...@gmail.com>
> 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 <ah...@adobe.com>
> > > >>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" <ma...@gmail.com>
> > 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 <
> aharui@adobe.com>
> > > >> >>wrote:
> > > >> >> >> >
> > > >> >> >> >> You may need to set the width to the width of the column.
> > > >> >> >> >>
> > > >> >> >> >> On 7/12/13 11:29 AM, "mark goldin" <ma...@gmail.com>
> > > >>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 <
> > aharui@adobe.com
> > > >
> > > >> >> >>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" <
> markzolotoy@gmail.com
> > >
> > > >> >>wrote:
> > > >> >> >> >> >>
> > > >> >> >> >> >> >Spark
> > > >> >> >> >> >> >
> > > >> >> >> >> >> >
> > > >> >> >> >> >> >On Fri, Jul 12, 2013 at 1:14 PM, Alex Harui
> > > >><aharui@adobe.com
> > > >> >
> > > >> >> >> >>wrote:
> > > >> >> >> >> >> >
> > > >> >> >> >> >> >> Spark or MX DataGrid?
> > > >> >> >> >> >> >>
> > > >> >> >> >> >> >> On 7/12/13 8:47 AM, "mark goldin" <
> > markzolotoy@gmail.com
> > > >
> > > >> >> >>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
> > > >> >> >> >> >> >>
> > > >> >> >> >> >> >>
> > > >> >> >> >> >>
> > > >> >> >> >> >>
> > > >> >> >> >>
> > > >> >> >> >>
> > > >> >> >>
> > > >> >> >>
> > > >> >>
> > > >> >>
> > > >>
> > > >>
> > >
> > >
> >
>

Re: Idea for item renderer

Posted by jude <fl...@gmail.com>.
Bottom is a style constraint. Try this,

    <s:DataGrid id="grid"
                width="500"
                height="500"
                dataProvider="{testdata}"
                variableRowHeight="true">
        <s:columns>
            <s:ArrayList>
            <s:GridColumn width="{grid.width-2}">
                <s:itemRenderer>
                    <fx:Component>
                        <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"
                          width="100%"
                          >
                         <fx:Script>
                        <![CDATA[
                        override public function
prepare(hasBeenRecycled:Boolean):void {
                            super.prepare(hasBeenRecycled);
                            trace("Prepare");
                            if (data) {
                                questionText.height = 48;
                                //questionText.width = column.width;
                            }
                            else {
                                questionText.height = 24;
                            }
                        }

                            override public function set
data(value:Object):void {
                                trace("set data");
                                super.data = value;
                                questionText.text = String(data);

                            }

                        ]]>
                        </fx:Script>
                        <s:layout>
                            <s:VerticalLayout gap="1"/>
                        </s:layout>

                         <!--- The renderer's visual component. -->
                        <s:RichEditableText id="questionText"
                                            verticalAlign="top"
                                            paddingTop="10"
                                            paddingBottom="10"
                                            width="100%"
                                            editable="false"

unfocusedTextSelectionColor="red"
                                            minWidth="0"
                                            multiline="true"
                                            paddingLeft="10"
                                            selectionHighlighting="always"/>
                        </s:GridItemRenderer>
                    </fx:Component>
                </s:itemRenderer>
            </s:GridColumn>
            </s:ArrayList>
        </s:columns>
    </s:DataGrid>



On Fri, Jul 12, 2013 at 8:38 PM, mark goldin <ma...@gmail.com> wrote:

> Bottom of what?
>
>
> On Fri, Jul 12, 2013 at 8:08 PM, Alex Harui <ah...@adobe.com> wrote:
>
> > Try using bottom.
> >
> > On 7/12/13 5:09 PM, "mark goldin" <ma...@gmail.com> wrote:
> >
> > >But if I need to specify height what do I do?
> > >
> > >
> > >On Fri, Jul 12, 2013 at 5:37 PM, Alex Harui <ah...@adobe.com> wrote:
> > >
> > >> Try not using % widths.  Use left,top,right,bottom as needed.
> > >>
> > >> On 7/12/13 1:24 PM, "mark goldin" <ma...@gmail.com> 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 <ah...@adobe.com>
> 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" <ma...@gmail.com> 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 <ah...@adobe.com>
> > >>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" <ma...@gmail.com>
> 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 <ah...@adobe.com>
> > >> >>wrote:
> > >> >> >> >
> > >> >> >> >> You may need to set the width to the width of the column.
> > >> >> >> >>
> > >> >> >> >> On 7/12/13 11:29 AM, "mark goldin" <ma...@gmail.com>
> > >>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 <
> aharui@adobe.com
> > >
> > >> >> >>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" <markzolotoy@gmail.com
> >
> > >> >>wrote:
> > >> >> >> >> >>
> > >> >> >> >> >> >Spark
> > >> >> >> >> >> >
> > >> >> >> >> >> >
> > >> >> >> >> >> >On Fri, Jul 12, 2013 at 1:14 PM, Alex Harui
> > >><aharui@adobe.com
> > >> >
> > >> >> >> >>wrote:
> > >> >> >> >> >> >
> > >> >> >> >> >> >> Spark or MX DataGrid?
> > >> >> >> >> >> >>
> > >> >> >> >> >> >> On 7/12/13 8:47 AM, "mark goldin" <
> markzolotoy@gmail.com
> > >
> > >> >> >>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
> > >> >> >> >> >> >>
> > >> >> >> >> >> >>
> > >> >> >> >> >>
> > >> >> >> >> >>
> > >> >> >> >>
> > >> >> >> >>
> > >> >> >>
> > >> >> >>
> > >> >>
> > >> >>
> > >>
> > >>
> >
> >
>

Re: Idea for item renderer

Posted by mark goldin <ma...@gmail.com>.
Bottom of what?


On Fri, Jul 12, 2013 at 8:08 PM, Alex Harui <ah...@adobe.com> wrote:

> Try using bottom.
>
> On 7/12/13 5:09 PM, "mark goldin" <ma...@gmail.com> wrote:
>
> >But if I need to specify height what do I do?
> >
> >
> >On Fri, Jul 12, 2013 at 5:37 PM, Alex Harui <ah...@adobe.com> wrote:
> >
> >> Try not using % widths.  Use left,top,right,bottom as needed.
> >>
> >> On 7/12/13 1:24 PM, "mark goldin" <ma...@gmail.com> 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 <ah...@adobe.com> 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" <ma...@gmail.com> 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 <ah...@adobe.com>
> >>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" <ma...@gmail.com> 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 <ah...@adobe.com>
> >> >>wrote:
> >> >> >> >
> >> >> >> >> You may need to set the width to the width of the column.
> >> >> >> >>
> >> >> >> >> On 7/12/13 11:29 AM, "mark goldin" <ma...@gmail.com>
> >>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 <aharui@adobe.com
> >
> >> >> >>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" <ma...@gmail.com>
> >> >>wrote:
> >> >> >> >> >>
> >> >> >> >> >> >Spark
> >> >> >> >> >> >
> >> >> >> >> >> >
> >> >> >> >> >> >On Fri, Jul 12, 2013 at 1:14 PM, Alex Harui
> >><aharui@adobe.com
> >> >
> >> >> >> >>wrote:
> >> >> >> >> >> >
> >> >> >> >> >> >> Spark or MX DataGrid?
> >> >> >> >> >> >>
> >> >> >> >> >> >> On 7/12/13 8:47 AM, "mark goldin" <markzolotoy@gmail.com
> >
> >> >> >>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
> >> >> >> >> >> >>
> >> >> >> >> >> >>
> >> >> >> >> >>
> >> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> >> >> >>
> >> >> >>
> >> >>
> >> >>
> >>
> >>
>
>

Re: Idea for item renderer

Posted by Alex Harui <ah...@adobe.com>.
Try using bottom.

On 7/12/13 5:09 PM, "mark goldin" <ma...@gmail.com> wrote:

>But if I need to specify height what do I do?
>
>
>On Fri, Jul 12, 2013 at 5:37 PM, Alex Harui <ah...@adobe.com> wrote:
>
>> Try not using % widths.  Use left,top,right,bottom as needed.
>>
>> On 7/12/13 1:24 PM, "mark goldin" <ma...@gmail.com> 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 <ah...@adobe.com> 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" <ma...@gmail.com> 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 <ah...@adobe.com>
>>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" <ma...@gmail.com> 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 <ah...@adobe.com>
>> >>wrote:
>> >> >> >
>> >> >> >> You may need to set the width to the width of the column.
>> >> >> >>
>> >> >> >> On 7/12/13 11:29 AM, "mark goldin" <ma...@gmail.com>
>>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 <ah...@adobe.com>
>> >> >>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" <ma...@gmail.com>
>> >>wrote:
>> >> >> >> >>
>> >> >> >> >> >Spark
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >On Fri, Jul 12, 2013 at 1:14 PM, Alex Harui
>><aharui@adobe.com
>> >
>> >> >> >>wrote:
>> >> >> >> >> >
>> >> >> >> >> >> Spark or MX DataGrid?
>> >> >> >> >> >>
>> >> >> >> >> >> On 7/12/13 8:47 AM, "mark goldin" <ma...@gmail.com>
>> >> >>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
>> >> >> >> >> >>
>> >> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>>
>>


Re: Idea for item renderer

Posted by mark goldin <ma...@gmail.com>.
But if I need to specify height what do I do?


On Fri, Jul 12, 2013 at 5:37 PM, Alex Harui <ah...@adobe.com> wrote:

> Try not using % widths.  Use left,top,right,bottom as needed.
>
> On 7/12/13 1:24 PM, "mark goldin" <ma...@gmail.com> 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 <ah...@adobe.com> 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" <ma...@gmail.com> 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 <ah...@adobe.com> 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" <ma...@gmail.com> 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 <ah...@adobe.com>
> >>wrote:
> >> >> >
> >> >> >> You may need to set the width to the width of the column.
> >> >> >>
> >> >> >> On 7/12/13 11:29 AM, "mark goldin" <ma...@gmail.com> 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 <ah...@adobe.com>
> >> >>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" <ma...@gmail.com>
> >>wrote:
> >> >> >> >>
> >> >> >> >> >Spark
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >On Fri, Jul 12, 2013 at 1:14 PM, Alex Harui <aharui@adobe.com
> >
> >> >> >>wrote:
> >> >> >> >> >
> >> >> >> >> >> Spark or MX DataGrid?
> >> >> >> >> >>
> >> >> >> >> >> On 7/12/13 8:47 AM, "mark goldin" <ma...@gmail.com>
> >> >>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
> >> >> >> >> >>
> >> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> >> >> >>
> >> >> >>
> >> >>
> >> >>
> >>
> >>
>
>

Re: Idea for item renderer

Posted by Alex Harui <ah...@adobe.com>.
Try not using % widths.  Use left,top,right,bottom as needed.

On 7/12/13 1:24 PM, "mark goldin" <ma...@gmail.com> 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 <ah...@adobe.com> 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" <ma...@gmail.com> 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 <ah...@adobe.com> 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" <ma...@gmail.com> 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 <ah...@adobe.com>
>>wrote:
>> >> >
>> >> >> You may need to set the width to the width of the column.
>> >> >>
>> >> >> On 7/12/13 11:29 AM, "mark goldin" <ma...@gmail.com> 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 <ah...@adobe.com>
>> >>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" <ma...@gmail.com>
>>wrote:
>> >> >> >>
>> >> >> >> >Spark
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >On Fri, Jul 12, 2013 at 1:14 PM, Alex Harui <ah...@adobe.com>
>> >> >>wrote:
>> >> >> >> >
>> >> >> >> >> Spark or MX DataGrid?
>> >> >> >> >>
>> >> >> >> >> On 7/12/13 8:47 AM, "mark goldin" <ma...@gmail.com>
>> >>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
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>>
>>


Re: Idea for item renderer

Posted by mark goldin <ma...@gmail.com>.
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 <ah...@adobe.com> 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" <ma...@gmail.com> 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 <ah...@adobe.com> 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" <ma...@gmail.com> 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 <ah...@adobe.com> wrote:
> >> >
> >> >> You may need to set the width to the width of the column.
> >> >>
> >> >> On 7/12/13 11:29 AM, "mark goldin" <ma...@gmail.com> 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 <ah...@adobe.com>
> >>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" <ma...@gmail.com> wrote:
> >> >> >>
> >> >> >> >Spark
> >> >> >> >
> >> >> >> >
> >> >> >> >On Fri, Jul 12, 2013 at 1:14 PM, Alex Harui <ah...@adobe.com>
> >> >>wrote:
> >> >> >> >
> >> >> >> >> Spark or MX DataGrid?
> >> >> >> >>
> >> >> >> >> On 7/12/13 8:47 AM, "mark goldin" <ma...@gmail.com>
> >>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
> >> >> >> >>
> >> >> >> >>
> >> >> >>
> >> >> >>
> >> >>
> >> >>
> >>
> >>
>
>

Re: Idea for item renderer

Posted by Alex Harui <ah...@adobe.com>.
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" <ma...@gmail.com> 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 <ah...@adobe.com> 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" <ma...@gmail.com> 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 <ah...@adobe.com> wrote:
>> >
>> >> You may need to set the width to the width of the column.
>> >>
>> >> On 7/12/13 11:29 AM, "mark goldin" <ma...@gmail.com> 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 <ah...@adobe.com>
>>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" <ma...@gmail.com> wrote:
>> >> >>
>> >> >> >Spark
>> >> >> >
>> >> >> >
>> >> >> >On Fri, Jul 12, 2013 at 1:14 PM, Alex Harui <ah...@adobe.com>
>> >>wrote:
>> >> >> >
>> >> >> >> Spark or MX DataGrid?
>> >> >> >>
>> >> >> >> On 7/12/13 8:47 AM, "mark goldin" <ma...@gmail.com>
>>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
>> >> >> >>
>> >> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>>
>>


Re: Idea for item renderer

Posted by mark goldin <ma...@gmail.com>.
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 <ah...@adobe.com> 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" <ma...@gmail.com> 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 <ah...@adobe.com> wrote:
> >
> >> You may need to set the width to the width of the column.
> >>
> >> On 7/12/13 11:29 AM, "mark goldin" <ma...@gmail.com> 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 <ah...@adobe.com> 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" <ma...@gmail.com> wrote:
> >> >>
> >> >> >Spark
> >> >> >
> >> >> >
> >> >> >On Fri, Jul 12, 2013 at 1:14 PM, Alex Harui <ah...@adobe.com>
> >>wrote:
> >> >> >
> >> >> >> Spark or MX DataGrid?
> >> >> >>
> >> >> >> On 7/12/13 8:47 AM, "mark goldin" <ma...@gmail.com> 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
> >> >> >>
> >> >> >>
> >> >>
> >> >>
> >>
> >>
>
>

Re: Idea for item renderer

Posted by mark goldin <ma...@gmail.com>.
If you are talking about  minWidth="0" and multiline="true" then sorry it
does not work.


On Fri, Jul 12, 2013 at 2:07 PM, OmPrakash Muppirala
<bi...@gmail.com>wrote:

> Perhaps this answer would help?
>
>
> http://stackoverflow.com/questions/3152292/flex-4-richeditabletext-word-wrap
>
> Thanks,
> Om
>
> On Fri, Jul 12, 2013 at 12:05 PM, mark goldin <ma...@gmail.com>
> 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 <ah...@adobe.com> wrote:
> >
> > > You may need to set the width to the width of the column.
> > >
> > > On 7/12/13 11:29 AM, "mark goldin" <ma...@gmail.com> 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 <ah...@adobe.com> 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" <ma...@gmail.com> wrote:
> > > >>
> > > >> >Spark
> > > >> >
> > > >> >
> > > >> >On Fri, Jul 12, 2013 at 1:14 PM, Alex Harui <ah...@adobe.com>
> > wrote:
> > > >> >
> > > >> >> Spark or MX DataGrid?
> > > >> >>
> > > >> >> On 7/12/13 8:47 AM, "mark goldin" <ma...@gmail.com> 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
> > > >> >>
> > > >> >>
> > > >>
> > > >>
> > >
> > >
> >
>

Re: Idea for item renderer

Posted by OmPrakash Muppirala <bi...@gmail.com>.
Perhaps this answer would help?

http://stackoverflow.com/questions/3152292/flex-4-richeditabletext-word-wrap

Thanks,
Om

On Fri, Jul 12, 2013 at 12:05 PM, mark goldin <ma...@gmail.com> 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 <ah...@adobe.com> wrote:
>
> > You may need to set the width to the width of the column.
> >
> > On 7/12/13 11:29 AM, "mark goldin" <ma...@gmail.com> 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 <ah...@adobe.com> 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" <ma...@gmail.com> wrote:
> > >>
> > >> >Spark
> > >> >
> > >> >
> > >> >On Fri, Jul 12, 2013 at 1:14 PM, Alex Harui <ah...@adobe.com>
> wrote:
> > >> >
> > >> >> Spark or MX DataGrid?
> > >> >>
> > >> >> On 7/12/13 8:47 AM, "mark goldin" <ma...@gmail.com> 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
> > >> >>
> > >> >>
> > >>
> > >>
> >
> >
>

Re: Idea for item renderer

Posted by Alex Harui <ah...@adobe.com>.
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" <ma...@gmail.com> 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 <ah...@adobe.com> wrote:
>
>> You may need to set the width to the width of the column.
>>
>> On 7/12/13 11:29 AM, "mark goldin" <ma...@gmail.com> 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 <ah...@adobe.com> 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" <ma...@gmail.com> wrote:
>> >>
>> >> >Spark
>> >> >
>> >> >
>> >> >On Fri, Jul 12, 2013 at 1:14 PM, Alex Harui <ah...@adobe.com>
>>wrote:
>> >> >
>> >> >> Spark or MX DataGrid?
>> >> >>
>> >> >> On 7/12/13 8:47 AM, "mark goldin" <ma...@gmail.com> 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
>> >> >>
>> >> >>
>> >>
>> >>
>>
>>


Re: Idea for item renderer

Posted by mark goldin <ma...@gmail.com>.
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 <ah...@adobe.com> wrote:

> You may need to set the width to the width of the column.
>
> On 7/12/13 11:29 AM, "mark goldin" <ma...@gmail.com> 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 <ah...@adobe.com> 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" <ma...@gmail.com> wrote:
> >>
> >> >Spark
> >> >
> >> >
> >> >On Fri, Jul 12, 2013 at 1:14 PM, Alex Harui <ah...@adobe.com> wrote:
> >> >
> >> >> Spark or MX DataGrid?
> >> >>
> >> >> On 7/12/13 8:47 AM, "mark goldin" <ma...@gmail.com> 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
> >> >>
> >> >>
> >>
> >>
>
>

Re: Idea for item renderer

Posted by Alex Harui <ah...@adobe.com>.
You may need to set the width to the width of the column.

On 7/12/13 11:29 AM, "mark goldin" <ma...@gmail.com> 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 <ah...@adobe.com> 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" <ma...@gmail.com> wrote:
>>
>> >Spark
>> >
>> >
>> >On Fri, Jul 12, 2013 at 1:14 PM, Alex Harui <ah...@adobe.com> wrote:
>> >
>> >> Spark or MX DataGrid?
>> >>
>> >> On 7/12/13 8:47 AM, "mark goldin" <ma...@gmail.com> 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
>> >>
>> >>
>>
>>


Re: Idea for item renderer

Posted by mark goldin <ma...@gmail.com>.
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 <ah...@adobe.com> 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" <ma...@gmail.com> wrote:
>
> >Spark
> >
> >
> >On Fri, Jul 12, 2013 at 1:14 PM, Alex Harui <ah...@adobe.com> wrote:
> >
> >> Spark or MX DataGrid?
> >>
> >> On 7/12/13 8:47 AM, "mark goldin" <ma...@gmail.com> 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
> >>
> >>
>
>

Re: Idea for item renderer

Posted by Alex Harui <ah...@adobe.com>.
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" <ma...@gmail.com> wrote:

>Spark
>
>
>On Fri, Jul 12, 2013 at 1:14 PM, Alex Harui <ah...@adobe.com> wrote:
>
>> Spark or MX DataGrid?
>>
>> On 7/12/13 8:47 AM, "mark goldin" <ma...@gmail.com> 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
>>
>>


Re: Idea for item renderer

Posted by mark goldin <ma...@gmail.com>.
Spark


On Fri, Jul 12, 2013 at 1:14 PM, Alex Harui <ah...@adobe.com> wrote:

> Spark or MX DataGrid?
>
> On 7/12/13 8:47 AM, "mark goldin" <ma...@gmail.com> 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
>
>

Re: Idea for item renderer

Posted by Alex Harui <ah...@adobe.com>.
Spark or MX DataGrid?

On 7/12/13 8:47 AM, "mark goldin" <ma...@gmail.com> 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