[flexcoders] Re: container width parent container's width when vertical scrollbar present
Nice- that's exactly how I wanted it to behave. I wish flex did this by default. Thanks. --- In flexcoders@yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote: Done and done. It's kinda kludgey, and perhaps I didn't choose the best event to listen in on, but it works. Browse here: http://www.gfunk007.com/flex/ResizeScrollingCanvas/ Download Archive.zip for the lot. Demo here: http://www.gfunk007.com/flex/ResizeScrollingCanvas/bin/testbed.html -Josh On Feb 5, 2008 4:27 AM, Alex Harui [EMAIL PROTECTED] wrote: Yeah, you're caught in a no-win situation. To get this right, we'd have to visit the children twice, once to figure out we need scrollbars and then again to give them final sizes. We opted to go with the current one-visit scheme for performance reasons. There's probably some way you can detect that the scrollbar is there, change the scrollpolicy and force a relayout. -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *dfalling *Sent:* Monday, February 04, 2008 7:33 AM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Re: container width parent container's width when vertical scrollbar present Yes, I've found that as one fix, but am not fond of it either... The application I'm working on will be run on a wide range of monitor resolutions, and it's likely that many users will not need the scrollbars in order to see the content. For them, I don't want to chop a bit of their screen real estate away in order to display an unnecessary scrollbar. At the same time, if a user doesn't have the vertical space, I'd like for flex to show the scrollbar. The hack I'm currently using is to add extra padding to the right side and disable horizontal scrolling. If the vertical bars show up, they crop that padding. This is less than ideal, as at one point (either before the bar is displayed or after) the padding will not be consistent around the content. This also steals screen space from people who don't need the bars, so it isn't ideal. I just wish there was a way to get containers to subtract the scrollbar's width from the width that they allow their children to use. They're percentage-based, so it's obvious that the intention was for them to take up as much (but no more) space available to them. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Alex Harui aharui@ wrote: I spend a couple of minutes on this. The rules are that, when verticalScrollPolicy=auto (default), the verticalScrollBar is not factored into the measurements and overlaps content, otherwise it would cause the scrollbar ripple. The simplest change to remove the horizontal scrollbar is to set verticalScrollPolicy=on on the outer Canvas. That way the verticalScrollBar is factored in. Because the widths are preset in this example, it is safe to do that since you know the verticalScrolLBar has to be on. -- Good people will do good things, and bad people will do bad things. But for good people to do bad thingsthat takes religion. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]
RE: [flexcoders] Re: container width parent container's width when vertical scrollbar present
Yeah, you're caught in a no-win situation. To get this right, we'd have to visit the children twice, once to figure out we need scrollbars and then again to give them final sizes. We opted to go with the current one-visit scheme for performance reasons. There's probably some way you can detect that the scrollbar is there, change the scrollpolicy and force a relayout. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dfalling Sent: Monday, February 04, 2008 7:33 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: container width parent container's width when vertical scrollbar present Yes, I've found that as one fix, but am not fond of it either... The application I'm working on will be run on a wide range of monitor resolutions, and it's likely that many users will not need the scrollbars in order to see the content. For them, I don't want to chop a bit of their screen real estate away in order to display an unnecessary scrollbar. At the same time, if a user doesn't have the vertical space, I'd like for flex to show the scrollbar. The hack I'm currently using is to add extra padding to the right side and disable horizontal scrolling. If the vertical bars show up, they crop that padding. This is less than ideal, as at one point (either before the bar is displayed or after) the padding will not be consistent around the content. This also steals screen space from people who don't need the bars, so it isn't ideal. I just wish there was a way to get containers to subtract the scrollbar's width from the width that they allow their children to use. They're percentage-based, so it's obvious that the intention was for them to take up as much (but no more) space available to them. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui [EMAIL PROTECTED] wrote: I spend a couple of minutes on this. The rules are that, when verticalScrollPolicy=auto (default), the verticalScrollBar is not factored into the measurements and overlaps content, otherwise it would cause the scrollbar ripple. The simplest change to remove the horizontal scrollbar is to set verticalScrollPolicy=on on the outer Canvas. That way the verticalScrollBar is factored in. Because the widths are preset in this example, it is safe to do that since you know the verticalScrolLBar has to be on.
[flexcoders] Re: container width parent container's width when vertical scrollbar present
Yes, I've found that as one fix, but am not fond of it either... The application I'm working on will be run on a wide range of monitor resolutions, and it's likely that many users will not need the scrollbars in order to see the content. For them, I don't want to chop a bit of their screen real estate away in order to display an unnecessary scrollbar. At the same time, if a user doesn't have the vertical space, I'd like for flex to show the scrollbar. The hack I'm currently using is to add extra padding to the right side and disable horizontal scrolling. If the vertical bars show up, they crop that padding. This is less than ideal, as at one point (either before the bar is displayed or after) the padding will not be consistent around the content. This also steals screen space from people who don't need the bars, so it isn't ideal. I just wish there was a way to get containers to subtract the scrollbar's width from the width that they allow their children to use. They're percentage-based, so it's obvious that the intention was for them to take up as much (but no more) space available to them. --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: I spend a couple of minutes on this. The rules are that, when verticalScrollPolicy=auto (default), the verticalScrollBar is not factored into the measurements and overlaps content, otherwise it would cause the scrollbar ripple. The simplest change to remove the horizontal scrollbar is to set verticalScrollPolicy=on on the outer Canvas. That way the verticalScrollBar is factored in. Because the widths are preset in this example, it is safe to do that since you know the verticalScrolLBar has to be on.
Re: [flexcoders] Re: container width parent container's width when vertical scrollbar present
Done and done. It's kinda kludgey, and perhaps I didn't choose the best event to listen in on, but it works. Browse here: http://www.gfunk007.com/flex/ResizeScrollingCanvas/ Download Archive.zip for the lot. Demo here: http://www.gfunk007.com/flex/ResizeScrollingCanvas/bin/testbed.html -Josh On Feb 5, 2008 4:27 AM, Alex Harui [EMAIL PROTECTED] wrote: Yeah, you're caught in a no-win situation. To get this right, we'd have to visit the children twice, once to figure out we need scrollbars and then again to give them final sizes. We opted to go with the current one-visit scheme for performance reasons. There's probably some way you can detect that the scrollbar is there, change the scrollpolicy and force a relayout. -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *dfalling *Sent:* Monday, February 04, 2008 7:33 AM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Re: container width parent container's width when vertical scrollbar present Yes, I've found that as one fix, but am not fond of it either... The application I'm working on will be run on a wide range of monitor resolutions, and it's likely that many users will not need the scrollbars in order to see the content. For them, I don't want to chop a bit of their screen real estate away in order to display an unnecessary scrollbar. At the same time, if a user doesn't have the vertical space, I'd like for flex to show the scrollbar. The hack I'm currently using is to add extra padding to the right side and disable horizontal scrolling. If the vertical bars show up, they crop that padding. This is less than ideal, as at one point (either before the bar is displayed or after) the padding will not be consistent around the content. This also steals screen space from people who don't need the bars, so it isn't ideal. I just wish there was a way to get containers to subtract the scrollbar's width from the width that they allow their children to use. They're percentage-based, so it's obvious that the intention was for them to take up as much (but no more) space available to them. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: I spend a couple of minutes on this. The rules are that, when verticalScrollPolicy=auto (default), the verticalScrollBar is not factored into the measurements and overlaps content, otherwise it would cause the scrollbar ripple. The simplest change to remove the horizontal scrollbar is to set verticalScrollPolicy=on on the outer Canvas. That way the verticalScrollBar is factored in. Because the widths are preset in this example, it is safe to do that since you know the verticalScrolLBar has to be on. -- Good people will do good things, and bad people will do bad things. But for good people to do bad things—that takes religion. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]
RE: [flexcoders] Re: container width parent container's width when vertical scrollbar present
I spend a couple of minutes on this. The rules are that, when verticalScrollPolicy=auto (default), the verticalScrollBar is not factored into the measurements and overlaps content, otherwise it would cause the scrollbar ripple. The simplest change to remove the horizontal scrollbar is to set verticalScrollPolicy=on on the outer Canvas. That way the verticalScrollBar is factored in. Because the widths are preset in this example, it is safe to do that since you know the verticalScrolLBar has to be on. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dfalling Sent: Thursday, January 31, 2008 1:05 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: container width parent container's width when vertical scrollbar present Thanks, I can understand that case as I've seen the scroll bars ripple down before. The only part about this that feels like a bug is how no matter how wide you make the outer container, it's always just a little bit too small to fit its contents. Any help is greatly appreciated...my current hack of disabling horizontal scrolling and adding padding is far from elegant. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui [EMAIL PROTECTED] wrote: If you comb through the archives you'll see that this topic comes up once a month. It isn't really a bug and is what we consider to be the lesser of two evils. If we shrank content area when scrollbars appeared, what would shrink a child container and cause it to show scrollbars and all you'd see is a cascade of scrollbars. So we don't, and you get into this situation instead. I'll try to solve your test case this weekend.
[flexcoders] Re: container width parent container's width when vertical scrollbar present
Same here. This really frustrates me and seems like an obvious bug. I'm surprised it's not fixed in Flex 3 either...it seems fairly common to have a component inside another that you want to be able to grow (percentage width) and scroll vertically. My fix is to disable horizontal scrolling and put an extra 10 pixels on the right side of the potentially scrollable area... This way I never get the horizontal scrollbars, and none of my content looks crop. I'm really not a fan of this though, since I either have extra padding when no scrollbar is present, or less padding when present. --- In flexcoders@yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote: I've found the same as you, I tried all sorts of things and couldn't really find a nice solution. Perhaps there's some way I don't know of to get the equivalent of HTML's clientWidth and use that like width={ parent.clientWidth} instead of width=100%... I usually either set a verticalscrollbarpolicy of either off or on where I butt up against this problem. -Josh On Jan 31, 2008 9:55 AM, dfalling [EMAIL PROTECTED] wrote: I finally got around to testing this in Flex 3. Even with Flex 3 and setting minheight/minwidth, I still get those scrollbars. Any other possible fixes (preferably Flex 2)? Thanks --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Alex Harui aharui@ wrote: There's a couple of older threads in the archives on this topic. Setting minHeight/minWIdth=0 often helps From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com [mailto: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On Behalf Of dfalling Sent: Wednesday, January 16, 2008 2:43 PM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Subject: [flexcoders] container width parent container's width when vertical scrollbar present I've run into a really annoying issue... If I have a container that is higher than its parent container, it will add not only a vertical scrollbar, but also a horizontal scrollbar. It does this even if its width is set to 100% and it has plenty of room to display its contents. The really frustrating thing about this is that no matter how wide you resize the container, it will never be able to fit its contents...it's always missing the same amount of space. To test, simply use the following code. Note the horizontal scrollbar that will not go away. mx:Canvas width=90% height=400 mx:Canvas width=100% height=440/ /mx:Canvas -- Good people will do good things, and bad people will do bad things. But for good people to do bad thingsthat takes religion. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]
[flexcoders] Re: container width parent container's width when vertical scrollbar present
Exactly... When vertical scrollbars are added to a container with a percentage width, it should report the new width (without the bar) so that its children resize properly. --- In flexcoders@yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote: Not as I understand clipContent. It just turns off scroll bars, no? What I want (and I assume the OP is the same) is for the value returned for 100% to represent the inside width of a container, so when you scroll vertically, that value drops by ~20 pixels, instead of automatically adding a horizontal scroll bar if you've got anything attached to the RHS of the container by either a right=foo or width=100%. -Josh
RE: [flexcoders] Re: container width parent container's width when vertical scrollbar present
If you comb through the archives you'll see that this topic comes up once a month. It isn't really a bug and is what we consider to be the lesser of two evils. If we shrank content area when scrollbars appeared, what would shrink a child container and cause it to show scrollbars and all you'd see is a cascade of scrollbars. So we don't, and you get into this situation instead. I'll try to solve your test case this weekend. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dfalling Sent: Thursday, January 31, 2008 11:12 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: container width parent container's width when vertical scrollbar present Exactly... When vertical scrollbars are added to a container with a percentage width, it should report the new width (without the bar) so that its children resize properly. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Josh McDonald [EMAIL PROTECTED] wrote: Not as I understand clipContent. It just turns off scroll bars, no? What I want (and I assume the OP is the same) is for the value returned for 100% to represent the inside width of a container, so when you scroll vertically, that value drops by ~20 pixels, instead of automatically adding a horizontal scroll bar if you've got anything attached to the RHS of the container by either a right=foo or width=100%. -Josh
[flexcoders] Re: container width parent container's width when vertical scrollbar present
Thanks, I can understand that case as I've seen the scroll bars ripple down before. The only part about this that feels like a bug is how no matter how wide you make the outer container, it's always just a little bit too small to fit its contents. Any help is greatly appreciated...my current hack of disabling horizontal scrolling and adding padding is far from elegant. --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: If you comb through the archives you'll see that this topic comes up once a month. It isn't really a bug and is what we consider to be the lesser of two evils. If we shrank content area when scrollbars appeared, what would shrink a child container and cause it to show scrollbars and all you'd see is a cascade of scrollbars. So we don't, and you get into this situation instead. I'll try to solve your test case this weekend.
Re: [flexcoders] Re: container width parent container's width when vertical scrollbar present
I understand the cascading scrollbars problem, but I really have to say that's a problem with your screens if you get this. It simply means that you have to have contents that also resize. But how is that not the case anyway if it's in a container of variable width? The contents of any container of variable width must themselves be variable width or they will have either scollbars / cut off when it's too small. The problem with the way flex has it implemented is that even if everything within my container is anchored to sides or has a % width, you'll still see a horizontal scrollbar when you add too much verrtical content, and personally I call this a bug- the whole thing would have rendered correctly if the container started out as X pixels wide and I resized the browser, why should it not if the container is resized by virtue of a scrollbar instead of my mouse hand? I don't think it fair to inflict the current situation on everybody simply to release people of having to design their forms for a horizontally resizing container. There's always minWidth if you want a screw you if you shrink my container any smaller you get scrollbars effect. I gotta move to California so we can sort stuff like this out over a few beers :) -Josh On Feb 1, 2008 7:05 AM, dfalling [EMAIL PROTECTED] wrote: Thanks, I can understand that case as I've seen the scroll bars ripple down before. The only part about this that feels like a bug is how no matter how wide you make the outer container, it's always just a little bit too small to fit its contents. Any help is greatly appreciated...my current hack of disabling horizontal scrolling and adding padding is far from elegant. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: If you comb through the archives you'll see that this topic comes up once a month. It isn't really a bug and is what we consider to be the lesser of two evils. If we shrank content area when scrollbars appeared, what would shrink a child container and cause it to show scrollbars and all you'd see is a cascade of scrollbars. So we don't, and you get into this situation instead. I'll try to solve your test case this weekend. -- Good people will do good things, and bad people will do bad things. But for good people to do bad things—that takes religion. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]
RE: [flexcoders] Re: container width parent container's width when vertical scrollbar present
If you move to California, you'll find it everything is done over wine and not beer :-) If I didn't have to deal with backward compat, I would change this behavior. It was really important when you coded everything in MXML in a text editor, but now with an IDE it seems less necessary, so, for the nost part, I agree with you. If you think you have a case that should work even given the current 'rules', file a bug so we can take a look. There might be some edge case. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Josh McDonald Sent: Thursday, January 31, 2008 10:53 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: container width parent container's width when vertical scrollbar present I understand the cascading scrollbars problem, but I really have to say that's a problem with your screens if you get this. It simply means that you have to have contents that also resize. But how is that not the case anyway if it's in a container of variable width? The contents of any container of variable width must themselves be variable width or they will have either scollbars / cut off when it's too small. The problem with the way flex has it implemented is that even if everything within my container is anchored to sides or has a % width, you'll still see a horizontal scrollbar when you add too much verrtical content, and personally I call this a bug- the whole thing would have rendered correctly if the container started out as X pixels wide and I resized the browser, why should it not if the container is resized by virtue of a scrollbar instead of my mouse hand? I don't think it fair to inflict the current situation on everybody simply to release people of having to design their forms for a horizontally resizing container. There's always minWidth if you want a screw you if you shrink my container any smaller you get scrollbars effect. I gotta move to California so we can sort stuff like this out over a few beers :) -Josh On Feb 1, 2008 7:05 AM, dfalling [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Thanks, I can understand that case as I've seen the scroll bars ripple down before. The only part about this that feels like a bug is how no matter how wide you make the outer container, it's always just a little bit too small to fit its contents. Any help is greatly appreciated...my current hack of disabling horizontal scrolling and adding padding is far from elegant. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui [EMAIL PROTECTED] wrote: If you comb through the archives you'll see that this topic comes up once a month. It isn't really a bug and is what we consider to be the lesser of two evils. If we shrank content area when scrollbars appeared, what would shrink a child container and cause it to show scrollbars and all you'd see is a cascade of scrollbars. So we don't, and you get into this situation instead. I'll try to solve your test case this weekend. -- Good people will do good things, and bad people will do bad things. But for good people to do bad things-that takes religion. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
[flexcoders] Re: container width parent container's width when vertical scrollbar present
I finally got around to testing this in Flex 3. Even with Flex 3 and setting minheight/minwidth, I still get those scrollbars. Any other possible fixes (preferably Flex 2)? Thanks --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: There's a couple of older threads in the archives on this topic. Setting minHeight/minWIdth=0 often helps From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dfalling Sent: Wednesday, January 16, 2008 2:43 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] container width parent container's width when vertical scrollbar present I've run into a really annoying issue... If I have a container that is higher than its parent container, it will add not only a vertical scrollbar, but also a horizontal scrollbar. It does this even if its width is set to 100% and it has plenty of room to display its contents. The really frustrating thing about this is that no matter how wide you resize the container, it will never be able to fit its contents...it's always missing the same amount of space. To test, simply use the following code. Note the horizontal scrollbar that will not go away. mx:Canvas width=90% height=400 mx:Canvas width=100% height=440/ /mx:Canvas
Re: [flexcoders] Re: container width parent container's width when vertical scrollbar present
I've found the same as you, I tried all sorts of things and couldn't really find a nice solution. Perhaps there's some way I don't know of to get the equivalent of HTML's clientWidth and use that like width={ parent.clientWidth} instead of width=100%... I usually either set a verticalscrollbarpolicy of either off or on where I butt up against this problem. -Josh On Jan 31, 2008 9:55 AM, dfalling [EMAIL PROTECTED] wrote: I finally got around to testing this in Flex 3. Even with Flex 3 and setting minheight/minwidth, I still get those scrollbars. Any other possible fixes (preferably Flex 2)? Thanks --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: There's a couple of older threads in the archives on this topic. Setting minHeight/minWIdth=0 often helps From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com [mailto: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On Behalf Of dfalling Sent: Wednesday, January 16, 2008 2:43 PM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Subject: [flexcoders] container width parent container's width when vertical scrollbar present I've run into a really annoying issue... If I have a container that is higher than its parent container, it will add not only a vertical scrollbar, but also a horizontal scrollbar. It does this even if its width is set to 100% and it has plenty of room to display its contents. The really frustrating thing about this is that no matter how wide you resize the container, it will never be able to fit its contents...it's always missing the same amount of space. To test, simply use the following code. Note the horizontal scrollbar that will not go away. mx:Canvas width=90% height=400 mx:Canvas width=100% height=440/ /mx:Canvas -- Good people will do good things, and bad people will do bad things. But for good people to do bad things—that takes religion. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]
Re: [flexcoders] Re: container width parent container's width when vertical scrollbar present
u mean like this? mx:Canvas width=90% height=400 clipContent=false mx:Canvas width=100% height=440/ /mx:Canvas - Original Message From: Josh McDonald [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Wednesday, January 30, 2008 6:11:46 PM Subject: Re: [flexcoders] Re: container width parent container's width when vertical scrollbar present I've found the same as you, I tried all sorts of things and couldn't really find a nice solution. Perhaps there's some way I don't know of to get the equivalent of HTML's clientWidth and use that like width={parent.clientWidth } instead of width=100%... I usually either set a verticalscrollbarpo licy of either off or on where I butt up against this problem. -Josh On Jan 31, 2008 9:55 AM, dfalling [EMAIL PROTECTED] com wrote: I finally got around to testing this in Flex 3. Even with Flex 3 and setting minheight/minwidth, I still get those scrollbars. Any other possible fixes (preferably Flex 2)? Thanks --- In [EMAIL PROTECTED] ups.com, Alex Harui [EMAIL PROTECTED] wrote: There's a couple of older threads in the archives on this topic. Setting minHeight/minWIdth= 0 often helps _ _ __ From: [EMAIL PROTECTED] ups.com [mailto:[EMAIL PROTECTED] ups.com] On Behalf Of dfalling Sent: Wednesday, January 16, 2008 2:43 PM To: [EMAIL PROTECTED] ups.com Subject: [flexcoders] container width parent container's width when vertical scrollbar present I've run into a really annoying issue... If I have a container that is higher than its parent container, it will add not only a vertical scrollbar, but also a horizontal scrollbar. It does this even if its width is set to 100% and it has plenty of room to display its contents. The really frustrating thing about this is that no matter how wide you resize the container, it will never be able to fit its contents...it's always missing the same amount of space. To test, simply use the following code. Note the horizontal scrollbar that will not go away. mx:Canvas width=90% height=400 mx:Canvas width=100% height=440/ /mx:Canvas -- Good people will do good things, and bad people will do bad things. But for good people to do bad things—that takes religion. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] com Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs
Re: [flexcoders] Re: container width parent container's width when vertical scrollbar present
Not as I understand clipContent. It just turns off scroll bars, no? What I want (and I assume the OP is the same) is for the value returned for 100% to represent the inside width of a container, so when you scroll vertically, that value drops by ~20 pixels, instead of automatically adding a horizontal scroll bar if you've got anything attached to the RHS of the container by either a right=foo or width=100%. -Josh On Jan 31, 2008 10:26 AM, Sherif Abdou [EMAIL PROTECTED] wrote: u mean like this? mx:Canvas width=90% height=400 clipContent=false mx:Canvas width=100% height=440/ /mx:Canvas - Original Message From: Josh McDonald [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Wednesday, January 30, 2008 6:11:46 PM Subject: Re: [flexcoders] Re: container width parent container's width when vertical scrollbar present I've found the same as you, I tried all sorts of things and couldn't really find a nice solution. Perhaps there's some way I don't know of to get the equivalent of HTML's clientWidth and use that like width={ parent.clientWidth } instead of width=100%... I usually either set a verticalscrollbarpo licy of either off or on where I butt up against this problem. -Josh On Jan 31, 2008 9:55 AM, dfalling [EMAIL PROTECTED] com[EMAIL PROTECTED] wrote: I finally got around to testing this in Flex 3. Even with Flex 3 and setting minheight/minwidth, I still get those scrollbars. Any other possible fixes (preferably Flex 2)? Thanks --- In [EMAIL PROTECTED] ups.com flexcoders%40yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: There's a couple of older threads in the archives on this topic. Setting minHeight/minWIdth= 0 often helps _ _ __ From: [EMAIL PROTECTED] ups.com flexcoders%40yahoogroups.com[mailto:[EMAIL PROTECTED] ups.com flexcoders%40yahoogroups.com] On Behalf Of dfalling Sent: Wednesday, January 16, 2008 2:43 PM To: [EMAIL PROTECTED] ups.com flexcoders%40yahoogroups.com Subject: [flexcoders] container width parent container's width when vertical scrollbar present I've run into a really annoying issue... If I have a container that is higher than its parent container, it will add not only a vertical scrollbar, but also a horizontal scrollbar. It does this even if its width is set to 100% and it has plenty of room to display its contents. The really frustrating thing about this is that no matter how wide you resize the container, it will never be able to fit its contents...it's always missing the same amount of space. To test, simply use the following code. Note the horizontal scrollbar that will not go away. mx:Canvas width=90% height=400 mx:Canvas width=100% height=440/ /mx:Canvas -- Good people will do good things, and bad people will do bad things. But for good people to do bad things—that takes religion. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] com [EMAIL PROTECTED] -- Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ -- Good people will do good things, and bad people will do bad things. But for good people to do bad things—that takes religion. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]
RE: [flexcoders] Re: container width parent container's width when vertical scrollbar present
I might be able to dig further on Friday or this weekend. Note that scrollPolicy affects whether the scrollbars are factored into width, and viewMetrics includes the scrollbars if they exist. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Josh McDonald Sent: Wednesday, January 30, 2008 4:48 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: container width parent container's width when vertical scrollbar present Not as I understand clipContent. It just turns off scroll bars, no? What I want (and I assume the OP is the same) is for the value returned for 100% to represent the inside width of a container, so when you scroll vertically, that value drops by ~20 pixels, instead of automatically adding a horizontal scroll bar if you've got anything attached to the RHS of the container by either a right=foo or width=100%. -Josh On Jan 31, 2008 10:26 AM, Sherif Abdou [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: u mean like this? mx:Canvas width=90% height=400 clipContent=false mx:Canvas width=100% height=440/ /mx:Canvas - Original Message From: Josh McDonald [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com Sent: Wednesday, January 30, 2008 6:11:46 PM Subject: Re: [flexcoders] Re: container width parent container's width when vertical scrollbar present I've found the same as you, I tried all sorts of things and couldn't really find a nice solution. Perhaps there's some way I don't know of to get the equivalent of HTML's clientWidth and use that like width={parent.clientWidth } instead of width=100%... I usually either set a verticalscrollbarpo licy of either off or on where I butt up against this problem. -Josh On Jan 31, 2008 9:55 AM, dfalling [EMAIL PROTECTED] com mailto:[EMAIL PROTECTED] wrote: I finally got around to testing this in Flex 3. Even with Flex 3 and setting minheight/minwidth, I still get those scrollbars. Any other possible fixes (preferably Flex 2)? Thanks --- In [EMAIL PROTECTED] ups.com mailto:flexcoders%40yahoogroups.com , Alex Harui [EMAIL PROTECTED] wrote: There's a couple of older threads in the archives on this topic. Setting minHeight/minWIdth= 0 often helps _ _ __ From: [EMAIL PROTECTED] ups.com mailto:flexcoders%40yahoogroups.com [mailto:[EMAIL PROTECTED] ups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of dfalling Sent: Wednesday, January 16, 2008 2:43 PM To: [EMAIL PROTECTED] ups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] container width parent container's width when vertical scrollbar present I've run into a really annoying issue... If I have a container that is higher than its parent container, it will add not only a vertical scrollbar, but also a horizontal scrollbar. It does this even if its width is set to 100% and it has plenty of room to display its contents. The really frustrating thing about this is that no matter how wide you resize the container, it will never be able to fit its contents...it's always missing the same amount of space. To test, simply use the following code. Note the horizontal scrollbar that will not go away. mx:Canvas width=90% height=400 mx:Canvas width=100% height=440/ /mx:Canvas -- Good people will do good things, and bad people will do bad things. But for good people to do bad things-that takes religion. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] com mailto:[EMAIL PROTECTED] Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://us.rd.yahoo.com/evt=51733/*http:/mobile.yahoo.com/;_ylt=Ahu06i62 sR8HDtDypao8Wcj9tAcJ -- Good people will do good things, and bad people will do bad things. But for good people to do bad things-that takes religion. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
[flexcoders] Re: container width parent container's width when vertical scrollbar present
I tried those settings on each canvas independently and then at the same time, but nothing changed. --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: There's a couple of older threads in the archives on this topic. Setting minHeight/minWIdth=0 often helps From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dfalling Sent: Wednesday, January 16, 2008 2:43 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] container width parent container's width when vertical scrollbar present I've run into a really annoying issue... If I have a container that is higher than its parent container, it will add not only a vertical scrollbar, but also a horizontal scrollbar. It does this even if its width is set to 100% and it has plenty of room to display its contents. The really frustrating thing about this is that no matter how wide you resize the container, it will never be able to fit its contents...it's always missing the same amount of space. To test, simply use the following code. Note the horizontal scrollbar that will not go away. mx:Canvas width=90% height=400 mx:Canvas width=100% height=440/ /mx:Canvas
[flexcoders] Re: container width parent container's width when vertical scrollbar present
Thanks for the response. The first method prevents me from having vertical scrolling, so any content I wanted to display via scrolling is now gone. The second method will clip any content that's under the vertical scrollbar. This shouldn't be a problem because that canvas is percentage based and shouldn't have anything there, but since it's confused and always draws itself wider than it has room, there will always be content there. I can add extra padding to that side to compensate, but then when there is no vertical scrollbar, I have uneven padding around my content. --- In flexcoders@yahoogroups.com, Sherif Abdou [EMAIL PROTECTED] wrote: All right so either you can do mx:Canvas width=90% height=400 clipContent=false mx:Canvas width=100% height=440 / /mx:Canvas or mx:Canvas width=90% height=400 horizontalScrollPolicy=off verticalScrollPolicy=off mx:Canvas width=100% height=440 / /mx:Canvas Is that what you mean? - Original Message From: dfalling [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Wednesday, January 16, 2008 4:42:42 PM Subject: [flexcoders] container width parent container's width when vertical scrollbar present I've run into a really annoying issue... If I have a container that is higher than its parent container, it will add not only a vertical scrollbar, but also a horizontal scrollbar. It does this even if its width is set to 100% and it has plenty of room to display its contents. The really frustrating thing about this is that no matter how wide you resize the container, it will never be able to fit its contents...it' s always missing the same amount of space. To test, simply use the following code. Note the horizontal scrollbar that will not go away. mx:Canvas width=90% height=400 mx:Canvas width=100% height=440 / /mx:Canvas Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping