Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Flex > Flex 2, 3 & 4

Reply
 
Thread Tools Rate Thread Display Modes
Old 05-24-2011, 06:36 PM   #1
flexable
Member
 
Join Date: May 2010
Location: india
Posts: 68
Default adding scroll to vgroup

i want to add scroller control to this vgoup bt as in flex 3 theres no property for scroll...wat should i do...
Code:
package Components
{//class used to create vbox for the specific category
	import spark.components.BorderContainer;
	import spark.components.HScrollBar;
	import spark.components.Scroller;
	import spark.components.VGroup;
	import spark.components.VScrollBar;

	public class Item extends VGroup
	{
		public function Item()
		{
			super();
		
			height=610;
			width=550;
			x=230;
			y=0;
		
		
			
		}
		
	}
}
after this i call the object..
Code:
	var vbbi:Item= new Item;
	pn.addElement(vbbi)
but the scroll is not working..
flexable is offline   Reply With Quote
Old 05-24-2011, 10:40 PM   #2
Barna Biro
Senior Member
 
Barna Biro's Avatar
 
Join Date: Nov 2009
Location: LU, Switzerland
Posts: 1,406
Default

The scrollbars should appear as soon as the content within your Item exceeds the height specified by you. If you want a scrollbar to be always present, then you might want to consider creating a Scrollbar instance and targeting your VGroup with it ( I don't recall the VGroup having any built-in functionality that would help you toggle any scrollbars on it... but you might want to read up on the Adobe LiveDocs and/or Language Reference on Group / VGroup )
__________________
Titus M. Plautus - Not by age but by capacity is wisdom acquired.
Barna Biro is offline   Reply With Quote
Old 05-25-2011, 07:28 AM   #3
flexable
Member
 
Join Date: May 2010
Location: india
Posts: 68
Default

that is wat i cant find..how to target it...
flexable is offline   Reply With Quote
Old 05-25-2011, 06:47 PM   #4
dr_zeus
Feathers
 
dr_zeus's Avatar
 
Join Date: Mar 2005
Location: Silicon Valley
Posts: 1,999
Default

Groups don't have built in scrollbars. Wrap it in a Scroller to make it work. Something like this:

Code:
<s:Scroller>
    <ns:Item width="100%" height="100%"/>
</s:Scroller>
Or, in your Item class, have a child Scroller and a child Group where the content should go.
__________________
Josh Tynjala | Feathers
dr_zeus is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:38 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.