You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Oleg Konovalov <ol...@gmail.com> on 2014/12/10 05:49:31 UTC

DataGroup with multiline TextArea

Hi,

I used to have a DataGroup with a Renderer which had a bunch of TextFields,
CheckBoxes, Dropdowns,... (all Renderer in 1 line)
Worked fine, was using it with VerticalLayout with requestMaxRowCount =4.
It had a button below to add an item or Delete button inside Renderer.
All that worked fine on a Form in TitleWindow popup.

I added to the Renderer a TextArea with heightInLines=2.
Now it became a total disaster: It does not allocate enough space to have
3-4 items, althought there is more than enough space on the Form.
Tried maxHeight in DataGroup or Scroller or its parent FormItem. Tried to
change requestedMaxRowCount in DataGroup VerticalLayout,...

Nothing works.

Any idea how to manage TextArea in DataGroup with Renderers?


By default there should be 0 (or max 1) row allocated.

Need it to work in Add & Edit mode.


TIA,
Oleg

Re: DataGroup with multiline TextArea

Posted by Oleg Konovalov <ol...@gmail.com>.
Alex, anybody,

Any idea what might be wrong in my code?


On Mon, Dec 15, 2014 at 12:20 AM, Oleg Konovalov <ol...@gmail.com> wrote:
>
> Here is the slightly simplified code. So basically I have a TitleWindow
> with a ViewStack of forms (depending on the Model user selects).
> Having trouble with  Table+Columns Forms (when I added Description
> TextArea to Table section and column Description to the renderer, both are
> 2 lines high. So now I can not show more then 2 columns on that form, used
> to have 4 - doesn't allow to expand that area although there is a lot of
> extra space on that popup, and I tried to add width or maxWidth in several
> places, and it cuts the width of it, so can show that column text area not
> more than 150px - way too small).
> Here is a code snippet:
>
> ColumnRenderer.mxml
>  <s:HGroup>
> <s:TextInput id="columnNameInput"  width="100"/>
> <s:CheckBox id="isPrimaryKey"/>
> <s:TextArea id="columnDescr" heightInLines="2" width="200
> "verticalScrollPolicy="on"/>
> <s:Button id="deleteBtn"/>
> </s:HGroup>
>  <s:TitleWindow width="850">
> <s:layout>
>    <s:VerticalLayout>
> </s:layout>
>  <s:VGroup>
>   <mx:ViewStack  width="100%" height="100%">
> <s:NavigatorContent id="physicalModel" width="750" height="500">
>    <s:Form id="physicalModelForm">
>       <s:layout>
>         <s:FormLayout gap="-14">
>       <s:layout>
>
>       <s:FormItem id="tableNameItem"  label="Table Name">
>        <s:TextInput id="tableNameInput"  width="120">
>       </s:FormItem>
>       <s:FormItem>
>         <s:TextArea id="tableDescr" heightInLines="2" width="600"
> "verticalScrollPolicy="on">
>       </s:FormItem>
>
>       <s:FormItem  id="columnsItem" includeInLayout="true" width="100%">
>          <s:Scroller width="100%" height="100%" includeInLayout="true">
>          <s:DataGroup includeInLayout="true"
> itemRenderer="ColumnRenderer">
>          <s:layout>
>          <s:VerticalLayout requestedMaxRowCount="2"/>
>          </s:layout>
>          </s:DataGroup>
>          <s:Scroller>
>       </s:FormItem>
>
>       <s:FormItem>
>          <s:Button id="addBtn"/>
>       </s:FormItem>
>
>    </s:Form>
>
> </s:NavigatorContent>
>   </mx:ViewStack>
>          <Submit and Cancel buttons>
>
> </s:VGroup>
> </s:TitleWindow>
>
>
> Please advise.
>
> TIA,
> Oleg.
>
> On Wed, Dec 10, 2014 at 2:07 PM, Alex Harui <ah...@adobe.com> wrote:
>>
>> Post the code if you can.
>>
>> On 12/10/14, 4:53 AM, "Oleg Konovalov" <ol...@gmail.com> wrote:
>>
>> >Usual 1 line items (TextInputs, Dropdown, checkbox) + added TextArea with
>> >2
>> >lines.
>> >Nothing special at all...
>> >
>> >On Wed, Dec 10, 2014 at 1:19 AM, Alex Harui <ah...@adobe.com> wrote:
>> >
>> >> What does the renderer code look like?
>> >>
>> >> On 12/9/14, 8:49 PM, "Oleg Konovalov" <ol...@gmail.com> wrote:
>> >>
>> >> >Hi,
>> >> >
>> >> >I used to have a DataGroup with a Renderer which had a bunch of
>> >> >TextFields,
>> >> >CheckBoxes, Dropdowns,... (all Renderer in 1 line)
>> >> >Worked fine, was using it with VerticalLayout with requestMaxRowCount
>> >>=4.
>> >> >It had a button below to add an item or Delete button inside Renderer.
>> >> >All that worked fine on a Form in TitleWindow popup.
>> >> >
>> >> >I added to the Renderer a TextArea with heightInLines=2.
>> >> >Now it became a total disaster: It does not allocate enough space to
>> >>have
>> >> >3-4 items, althought there is more than enough space on the Form.
>> >> >Tried maxHeight in DataGroup or Scroller or its parent FormItem. Tried
>> >>to
>> >> >change requestedMaxRowCount in DataGroup VerticalLayout,...
>> >> >
>> >> >Nothing works.
>> >> >
>> >> >Any idea how to manage TextArea in DataGroup with Renderers?
>> >> >
>> >> >
>> >> >By default there should be 0 (or max 1) row allocated.
>> >> >
>> >> >Need it to work in Add & Edit mode.
>> >> >
>> >> >
>> >> >TIA,
>> >> >Oleg
>> >>
>> >>
>> >
>> >
>> >--
>> >Thank you,
>> >Oleg.
>>
>>
>
> --
> Thank you,
> Oleg.
>


-- 
Thank you,
Oleg.

Re: DataGroup with multiline TextArea

Posted by Oleg Konovalov <ol...@gmail.com>.
Here is the slightly simplified code. So basically I have a TitleWindow
with a ViewStack of forms (depending on the Model user selects).
Having trouble with  Table+Columns Forms (when I added Description TextArea
to Table section and column Description to the renderer, both are 2 lines
high. So now I can not show more then 2 columns on that form, used to have
4 - doesn't allow to expand that area although there is a lot of extra
space on that popup, and I tried to add width or maxWidth in several
places, and it cuts the width of it, so can show that column text area not
more than 150px - way too small).
Here is a code snippet:

ColumnRenderer.mxml
 <s:HGroup>
<s:TextInput id="columnNameInput"  width="100"/>
<s:CheckBox id="isPrimaryKey"/>
<s:TextArea id="columnDescr" heightInLines="2" width="200
"verticalScrollPolicy="on"/>
<s:Button id="deleteBtn"/>
</s:HGroup>
 <s:TitleWindow width="850">
<s:layout>
   <s:VerticalLayout>
</s:layout>
 <s:VGroup>
  <mx:ViewStack  width="100%" height="100%">
<s:NavigatorContent id="physicalModel" width="750" height="500">
   <s:Form id="physicalModelForm">
      <s:layout>
        <s:FormLayout gap="-14">
      <s:layout>

      <s:FormItem id="tableNameItem"  label="Table Name">
       <s:TextInput id="tableNameInput"  width="120">
      </s:FormItem>
      <s:FormItem>
        <s:TextArea id="tableDescr" heightInLines="2" width="600"
"verticalScrollPolicy="on">
      </s:FormItem>

      <s:FormItem  id="columnsItem" includeInLayout="true" width="100%">
         <s:Scroller width="100%" height="100%" includeInLayout="true">
         <s:DataGroup includeInLayout="true" itemRenderer="ColumnRenderer">
         <s:layout>
         <s:VerticalLayout requestedMaxRowCount="2"/>
         </s:layout>
         </s:DataGroup>
         <s:Scroller>
      </s:FormItem>

      <s:FormItem>
         <s:Button id="addBtn"/>
      </s:FormItem>

   </s:Form>

</s:NavigatorContent>
  </mx:ViewStack>
         <Submit and Cancel buttons>

</s:VGroup>
</s:TitleWindow>


Please advise.

TIA,
Oleg.

On Wed, Dec 10, 2014 at 2:07 PM, Alex Harui <ah...@adobe.com> wrote:
>
> Post the code if you can.
>
> On 12/10/14, 4:53 AM, "Oleg Konovalov" <ol...@gmail.com> wrote:
>
> >Usual 1 line items (TextInputs, Dropdown, checkbox) + added TextArea with
> >2
> >lines.
> >Nothing special at all...
> >
> >On Wed, Dec 10, 2014 at 1:19 AM, Alex Harui <ah...@adobe.com> wrote:
> >
> >> What does the renderer code look like?
> >>
> >> On 12/9/14, 8:49 PM, "Oleg Konovalov" <ol...@gmail.com> wrote:
> >>
> >> >Hi,
> >> >
> >> >I used to have a DataGroup with a Renderer which had a bunch of
> >> >TextFields,
> >> >CheckBoxes, Dropdowns,... (all Renderer in 1 line)
> >> >Worked fine, was using it with VerticalLayout with requestMaxRowCount
> >>=4.
> >> >It had a button below to add an item or Delete button inside Renderer.
> >> >All that worked fine on a Form in TitleWindow popup.
> >> >
> >> >I added to the Renderer a TextArea with heightInLines=2.
> >> >Now it became a total disaster: It does not allocate enough space to
> >>have
> >> >3-4 items, althought there is more than enough space on the Form.
> >> >Tried maxHeight in DataGroup or Scroller or its parent FormItem. Tried
> >>to
> >> >change requestedMaxRowCount in DataGroup VerticalLayout,...
> >> >
> >> >Nothing works.
> >> >
> >> >Any idea how to manage TextArea in DataGroup with Renderers?
> >> >
> >> >
> >> >By default there should be 0 (or max 1) row allocated.
> >> >
> >> >Need it to work in Add & Edit mode.
> >> >
> >> >
> >> >TIA,
> >> >Oleg
> >>
> >>
> >
> >
> >--
> >Thank you,
> >Oleg.
>
>

-- 
Thank you,
Oleg.

Re: DataGroup with multiline TextArea

Posted by Alex Harui <ah...@adobe.com>.
Post the code if you can.

On 12/10/14, 4:53 AM, "Oleg Konovalov" <ol...@gmail.com> wrote:

>Usual 1 line items (TextInputs, Dropdown, checkbox) + added TextArea with
>2
>lines.
>Nothing special at all...
>
>On Wed, Dec 10, 2014 at 1:19 AM, Alex Harui <ah...@adobe.com> wrote:
>
>> What does the renderer code look like?
>>
>> On 12/9/14, 8:49 PM, "Oleg Konovalov" <ol...@gmail.com> wrote:
>>
>> >Hi,
>> >
>> >I used to have a DataGroup with a Renderer which had a bunch of
>> >TextFields,
>> >CheckBoxes, Dropdowns,... (all Renderer in 1 line)
>> >Worked fine, was using it with VerticalLayout with requestMaxRowCount
>>=4.
>> >It had a button below to add an item or Delete button inside Renderer.
>> >All that worked fine on a Form in TitleWindow popup.
>> >
>> >I added to the Renderer a TextArea with heightInLines=2.
>> >Now it became a total disaster: It does not allocate enough space to
>>have
>> >3-4 items, althought there is more than enough space on the Form.
>> >Tried maxHeight in DataGroup or Scroller or its parent FormItem. Tried
>>to
>> >change requestedMaxRowCount in DataGroup VerticalLayout,...
>> >
>> >Nothing works.
>> >
>> >Any idea how to manage TextArea in DataGroup with Renderers?
>> >
>> >
>> >By default there should be 0 (or max 1) row allocated.
>> >
>> >Need it to work in Add & Edit mode.
>> >
>> >
>> >TIA,
>> >Oleg
>>
>>
>
>
>-- 
>Thank you,
>Oleg.


Re: DataGroup with multiline TextArea

Posted by Oleg Konovalov <ol...@gmail.com>.
Usual 1 line items (TextInputs, Dropdown, checkbox) + added TextArea with 2
lines.
Nothing special at all...

On Wed, Dec 10, 2014 at 1:19 AM, Alex Harui <ah...@adobe.com> wrote:

> What does the renderer code look like?
>
> On 12/9/14, 8:49 PM, "Oleg Konovalov" <ol...@gmail.com> wrote:
>
> >Hi,
> >
> >I used to have a DataGroup with a Renderer which had a bunch of
> >TextFields,
> >CheckBoxes, Dropdowns,... (all Renderer in 1 line)
> >Worked fine, was using it with VerticalLayout with requestMaxRowCount =4.
> >It had a button below to add an item or Delete button inside Renderer.
> >All that worked fine on a Form in TitleWindow popup.
> >
> >I added to the Renderer a TextArea with heightInLines=2.
> >Now it became a total disaster: It does not allocate enough space to have
> >3-4 items, althought there is more than enough space on the Form.
> >Tried maxHeight in DataGroup or Scroller or its parent FormItem. Tried to
> >change requestedMaxRowCount in DataGroup VerticalLayout,...
> >
> >Nothing works.
> >
> >Any idea how to manage TextArea in DataGroup with Renderers?
> >
> >
> >By default there should be 0 (or max 1) row allocated.
> >
> >Need it to work in Add & Edit mode.
> >
> >
> >TIA,
> >Oleg
>
>


-- 
Thank you,
Oleg.

Re: DataGroup with multiline TextArea

Posted by Alex Harui <ah...@adobe.com>.
What does the renderer code look like?

On 12/9/14, 8:49 PM, "Oleg Konovalov" <ol...@gmail.com> wrote:

>Hi,
>
>I used to have a DataGroup with a Renderer which had a bunch of
>TextFields,
>CheckBoxes, Dropdowns,... (all Renderer in 1 line)
>Worked fine, was using it with VerticalLayout with requestMaxRowCount =4.
>It had a button below to add an item or Delete button inside Renderer.
>All that worked fine on a Form in TitleWindow popup.
>
>I added to the Renderer a TextArea with heightInLines=2.
>Now it became a total disaster: It does not allocate enough space to have
>3-4 items, althought there is more than enough space on the Form.
>Tried maxHeight in DataGroup or Scroller or its parent FormItem. Tried to
>change requestedMaxRowCount in DataGroup VerticalLayout,...
>
>Nothing works.
>
>Any idea how to manage TextArea in DataGroup with Renderers?
>
>
>By default there should be 0 (or max 1) row allocated.
>
>Need it to work in Add & Edit mode.
>
>
>TIA,
>Oleg