2 Replies Latest reply on Aug 21, 2008 5:23 AM by Newsgroup_User

    How to add an image or button to an AdvancedDataGrid cell with wrapped text alongside

    ms10
      I have an advanced data grid with which i need to add either images or buttons to individual cells alongside the text.

      This i can do, but what i can't figure out is how to make the text wrap.

      Currently, I can make cell text wrap by using an itemRenderer which extends Text. Or, I can add an image or button to a cell by using an itemRenderer which extends HBox and contains an image or button child. To this HBox i can add a Text or Label object also, but i can't make the text wrap.

      Does anyone have any ideas/suggestions/solutions????

      Thanks
      Mark
        • 1. Re: How to add an image or button to an AdvancedDataGrid cell with wrapped text alongside
          Gregory Lafrance Level 6
          How about include the image within an htmlText attribute. I'm not sure if you would use a Text control, or rather a TextArea control or something else, but htmlText property allows you to have text wrapped around images I believe.
          • 2. Re: How to add an image or button to an AdvancedDataGrid cell with wrapped text alongside
            Level 7

            "ms10" <webforumsuser@macromedia.com> wrote in message
            news:g8jlb5$l6p$1@forums.macromedia.com...
            >I have an advanced data grid with which i need to add either images or
            >buttons
            > to individual cells alongside the text.
            >
            > This i can do, but what i can't figure out is how to make the text wrap.
            >
            > Currently, I can make cell text wrap by using an itemRenderer which
            > extends
            > Text. Or, I can add an image or button to a cell by using an itemRenderer
            > which
            > extends HBox and contains an image or button child. To this HBox i can add
            > a
            > Text or Label object also, but i can't make the text wrap.
            >
            > Does anyone have any ideas/suggestions/solutions????

            I'd look at the code for AdvancedDataGridGroupItemRenderer and try to see
            what keeps it from displaying an icon in the columns that are not grouping
            columns. I'd then extend it to change that and use an icon function.

            HTH;

            Amy