# Custom Flex Widget Does Not Scroll

**URL:** <https://forum.kirupa.com/t/custom-flex-widget-does-not-scroll/323383>\
**Category:** flash\
**Created:** [June 28, 2011, 3:33pm UTC](https://forum.kirupa.com/t/custom-flex-widget-does-not-scroll/323383 "2011-06-28T15:33:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![riveroaks](https://avatars.discourse-cdn.com/v4/letter/r/90db22/32.png) [@riveroaks](https://forum.kirupa.com/u/riveroaks)\
**Post date:** [June 28, 2011, 3:33pm UTC](https://forum.kirupa.com/t/custom-flex-widget-does-not-scroll/323383/1 "2011-06-28T15:33:28Z")

</div>

Greetings,

I have created a custom Flex widget by extending UIComponent that I call FlexMapBuilderWidget. I have overriden the various UIComponent methods for measurement, children, display list, etc.

I used this widget to replace a plain old Sprite so that I could add some layout based functionality. When the Sprite was there, I was able to get scrollbars using:

```auto

<s:Scroller width="100%" height="100%">
	<s:Group width="100%" height="100%" clipAndEnableScrolling="true">
		<gapView:MapBuilderWidget id="mapDisplay" />
	</s:Group>
</s:Scroller>

```

But when I replace that Sprite with my custom UIComponent, I no longer get scrollbars:

```auto

<s:Scroller width="100%" height="100%">
	<s:Group width="100%" height="100%" clipAndEnableScrolling="true">
		<gapView:FlexMapBuilderWidget id="mapDisplay" />
	</s:Group>
</s:Scroller>

```

Any idea why? I have done test output to check the reported size of the FlexMapBuilderWidget in its measure() and updateDisplayList() methods, the size is always reported as a large enough number to require scrollbars.

Thanks.
