Re: [flexcoders] Panel and Scrollbars (basic question)

2007-02-02 Thread Rachel Maxim

Hi Neil,

Sorry, I couldn't actually run this because of the
PredefinedEntitiesFromReport data being missing (nothing populated). I see
what you are saying about the dynamic sizing, I don't think I can suggest a
better way than what you have.

If you were to make the layout of the base component absolute it could still
be dynamically sized, that would allow you to set constraints for its
children which would make the content stretch to the appropriate width. The
component should still stretch to whatever size you pass to it.
Unfortunately the size would not be determined by its children.

Oh well, sorry I couldn't be of more help!
Rachel

On 2/2/07, nwebb <[EMAIL PROTECTED]> wrote:


Hi Rachel,
   the panel will be used to populate a modal pop-up window.
It's currently not absolute or constrained.
The content is dynamic and so I never know exactly what the width of the
CheckBox labels or "lbl" text will be - therefore I don't want absolute
values used for the width. The Panel should pretty much be able to handle
what is thrown at it.

I could simply listen for a scroll event and add/subtract 16 pixels to the
width of the box depending on whether my content scrolls or not, but I was
just guessing that this kind of resizing was a such a common task that there
would be some in-built way of handling it. If not I'll just have to make
myself a component to do the job.

If you're interested, the code is below :]

Cheers.

ps The content won't change whilst the box is already visible, and
therefore I don't have to worry about my content "jumping about".

//--CODE
FOLLOWS--

//CLASS: PredefinedEntitiesFromReport.mxml
//This class displays a vertical list of names (entities) with checkboxes
by their side. The user selects the names of the people they want to include
in the report and then proceeds. There are buttons for "select all" and
"select none" - ie - it is the same setup as you would use to
select/unselect multiple emails with an app like GMail.


http://www.adobe.com/2006/mxml"; title="Existing Report
Entities Found"
maxHeight="200" horizontalScrollPolicy="off"
creationComplete="init();"
paddingBottom="10" paddingLeft="10" paddingRight="10"
paddingTop="10" height="100%">

 
 
 



 

 


 












On 2/1/07, Rachel Maxim <[EMAIL PROTECTED]> wrote:
>
>   This may or may not be the answer you are looking for... but is the
> content of your panel laid out using constraints or absolute values? If you
> do it with constraints, then your content should get resized when the
> scrollbar appears. Then again, this may be the inverse of what you are
> trying to do, and it may cause labels or text to get truncated.
>
> Is there a reason that you cannot make the panel wide enough to
> accomodate your content and scroll bar both, then if the scroll bar doesn't
> show up then it will just be a little more padding to the right.
> It seems like if you were to resize the panel dynamically with a scroll
> event then it might "jump around" which may not be the desired effect.
>
> If you can post code I'd be happy to take a look, I've done a lot of
> tweaking layouts with lots of scrollbars lately!
>
> HTH
> Rachel
>
>
> On 2/1/07, nwebb <[EMAIL PROTECTED]> wrote:
> >
> >  Hi,
> >
> > I'm sure this is excruciatingly simple but i couldn't find an answer
> > (I must be searching with the wrong keywords).
> >
> > I have a Panel.
> > Inside it is a Text component, and a Repeater underneath that
> > (...repeating a CheckBox) .
> > All works fine.
> >
> > I want to set the "maxHeight" of the Panel to 200px, so that if I get
> > too many Checkboxes appearing, my content will scroll vertically.
> >
> > When I set maxHeight, I get *both* horizontal and vertical scrollbars
> > appearing - the horizontal scrollbar only appears because the width of the
> > vertical scrollbar eats in to the Panel width - therefore I get horizontal
> > scrolling of about 16 pixels.
> >
> > If I set horizontalScrollbarPolicy to false then my content is still
> > clipped.
> > I'm sure I can muster a workaround easily enough (e.g. manually resize
> > Panel based on ScrollEvent etc), but I thought there surely must be
> > something in-built and neater, already in place to deal with this kind of
> > scenario?
> >
> > Any help much appreciated.
> >
>
>




Re: [flexcoders] Panel and Scrollbars (basic question)

2007-02-01 Thread nwebb

Hi Rachel,
  the panel will be used to populate a modal pop-up window.
It's currently not absolute or constrained.
The content is dynamic and so I never know exactly what the width of the
CheckBox labels or "lbl" text will be - therefore I don't want absolute
values used for the width. The Panel should pretty much be able to handle
what is thrown at it.

I could simply listen for a scroll event and add/subtract 16 pixels to the
width of the box depending on whether my content scrolls or not, but I was
just guessing that this kind of resizing was a such a common task that there
would be some in-built way of handling it. If not I'll just have to make
myself a component to do the job.

If you're interested, the code is below :]

Cheers.

ps The content won't change whilst the box is already visible, and therefore
I don't have to worry about my content "jumping about".

//--CODE
FOLLOWS--

//CLASS: PredefinedEntitiesFromReport.mxml
//This class displays a vertical list of names (entities) with checkboxes by
their side. The user selects the names of the people they want to include in
the report and then proceeds. There are buttons for "select all" and "select
none" - ie - it is the same setup as you would use to select/unselect
multiple emails with an app like GMail.


http://www.adobe.com/2006/mxml"; title="Existing Report
Entities Found"
   maxHeight="200" horizontalScrollPolicy="off"
creationComplete="init();"
   paddingBottom="10" paddingLeft="10" paddingRight="10"
paddingTop="10" height="100%">





   
   

   


   

   
   
   
   
   
   
   





On 2/1/07, Rachel Maxim <[EMAIL PROTECTED]> wrote:


  This may or may not be the answer you are looking for... but is the
content of your panel laid out using constraints or absolute values? If you
do it with constraints, then your content should get resized when the
scrollbar appears. Then again, this may be the inverse of what you are
trying to do, and it may cause labels or text to get truncated.

Is there a reason that you cannot make the panel wide enough to accomodate
your content and scroll bar both, then if the scroll bar doesn't show up
then it will just be a little more padding to the right.
It seems like if you were to resize the panel dynamically with a scroll
event then it might "jump around" which may not be the desired effect.

If you can post code I'd be happy to take a look, I've done a lot of
tweaking layouts with lots of scrollbars lately!

HTH
Rachel


On 2/1/07, nwebb <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I'm sure this is excruciatingly simple but i couldn't find an answer (I
> must be searching with the wrong keywords).
>
> I have a Panel.
> Inside it is a Text component, and a Repeater underneath that
> (...repeating a CheckBox) .
> All works fine.
>
> I want to set the "maxHeight" of the Panel to 200px, so that if I get
> too many Checkboxes appearing, my content will scroll vertically.
>
> When I set maxHeight, I get *both* horizontal and vertical scrollbars
> appearing - the horizontal scrollbar only appears because the width of the
> vertical scrollbar eats in to the Panel width - therefore I get horizontal
> scrolling of about 16 pixels.
>
> If I set horizontalScrollbarPolicy to false then my content is still
> clipped.
> I'm sure I can muster a workaround easily enough (e.g. manually resize
> Panel based on ScrollEvent etc), but I thought there surely must be
> something in-built and neater, already in place to deal with this kind of
> scenario?
>
> Any help much appreciated.
>

 



Re: [flexcoders] Panel and Scrollbars (basic question)

2007-02-01 Thread Rachel Maxim

This may or may not be the answer you are looking for... but is the content
of your panel laid out using constraints or absolute values? If you do it
with constraints, then your content should get resized when the scrollbar
appears. Then again, this may be the inverse of what you are trying to do,
and it may cause labels or text to get truncated.

Is there a reason that you cannot make the panel wide enough to accomodate
your content and scroll bar both, then if the scroll bar doesn't show up
then it will just be a little more padding to the right.
It seems like if you were to resize the panel dynamically with a scroll
event then it might "jump around" which may not be the desired effect.

If you can post code I'd be happy to take a look, I've done a lot of
tweaking layouts with lots of scrollbars lately!

HTH
Rachel

On 2/1/07, nwebb <[EMAIL PROTECTED]> wrote:


Hi,

I'm sure this is excruciatingly simple but i couldn't find an answer (I
must be searching with the wrong keywords).

I have a Panel.
Inside it is a Text component, and a Repeater underneath that
(...repeating a CheckBox) .
All works fine.

I want to set the "maxHeight" of the Panel to 200px, so that if I get too
many Checkboxes appearing, my content will scroll vertically.

When I set maxHeight, I get *both* horizontal and vertical scrollbars
appearing - the horizontal scrollbar only appears because the width of the
vertical scrollbar eats in to the Panel width - therefore I get horizontal
scrolling of about 16 pixels.

If I set horizontalScrollbarPolicy to false then my content is still
clipped.
I'm sure I can muster a workaround easily enough (e.g. manually resize
Panel based on ScrollEvent etc), but I thought there surely must be
something in-built and neater, already in place to deal with this kind of
scenario?

Any help much appreciated.




[flexcoders] Panel and Scrollbars (basic question)

2007-02-01 Thread nwebb

Hi,

I'm sure this is excruciatingly simple but i couldn't find an answer (I must
be searching with the wrong keywords).

I have a Panel.
Inside it is a Text component, and a Repeater underneath that (...repeating
a CheckBox) .
All works fine.

I want to set the "maxHeight" of the Panel to 200px, so that if I get too
many Checkboxes appearing, my content will scroll vertically.

When I set maxHeight, I get *both* horizontal and vertical scrollbars
appearing - the horizontal scrollbar only appears because the width of the
vertical scrollbar eats in to the Panel width - therefore I get horizontal
scrolling of about 16 pixels.

If I set horizontalScrollbarPolicy to false then my content is still
clipped.
I'm sure I can muster a workaround easily enough (e.g. manually resize Panel
based on ScrollEvent etc), but I thought there surely must be something
in-built and neater, already in place to deal with this kind of scenario?

Any help much appreciated.