[flexcoders] Re: Question about a flex component
I want to make the icons visible only if the horizontal scroll is enabled (because enough items were put in the horizontal list). How do I do that? Thanks, Veena --- In flexcoders@yahoogroups.com, veena_kris2003 v.kri...@... wrote: Hi, Thanks for your answer. Do you mind posting an example? Thanks, Veena --- In flexcoders@yahoogroups.com, Gordon Smith gosmith@ wrote: Why not just allow scrolling instead of paging? Scrolling components can scroll through thousands of items quickly. Suppose there are 100 items and you can only see 10 at a time. So first you see 0-9. When you click the icon you see 10-19. When you click it again you'd see 20-29. So you'd need another icon (previous page instead of next page) to go back to 10-19 and then 0-9. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of veena pandit Sent: Thursday, July 23, 2009 10:22 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Question about a flex component Hi, I am new to Flex. I am looking for help on designing a custom component that will hold a lot of items. When the items exceed the number that are visible in the ui of this horizontal component on the webpage an icon appears, which if you click will show a list of the other components you can click again and restore the ui with that item. Hope you understand what I am talking about. If not please post for clarification. Thanks in advance, Veena
[flexcoders] Re: Question about a flex component
how do i make visible invisible the icons for previous/next? --- In flexcoders@yahoogroups.com, veena pandit v.kri...@... wrote: Hi, I am new to Flex. I am looking for help on designing a custom component that will hold a lot of items. When the items exceed the number that are visible in the ui of this horizontal component on the webpage an icon appears, which if you click will show a list of the other components you can click again and restore the ui with that item. Hope you understand what I am talking about. If not please post for clarification. Thanks in advance, Veena
RE: [flexcoders] Re: Question about a flex component
UIComponents have a visible:Boolean property which you can set to true or false. You can tell whether a Container is scrollable by checking whether its maxHorizontalScrollPosition is greater than 0. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of veena_kris2003 Sent: Tuesday, August 04, 2009 10:21 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Question about a flex component how do i make visible invisible the icons for previous/next? --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, veena pandit v.kri...@... wrote: Hi, I am new to Flex. I am looking for help on designing a custom component that will hold a lot of items. When the items exceed the number that are visible in the ui of this horizontal component on the webpage an icon appears, which if you click will show a list of the other components you can click again and restore the ui with that item. Hope you understand what I am talking about. If not please post for clarification. Thanks in advance, Veena
[flexcoders] Re: Question about a flex component
Does anyone know of icons or images I can use in my buttons instead of labeling them Previous and Next. I tried to google it and I did not find anything. Thanks. --- In flexcoders@yahoogroups.com, Gordon Smith gosm...@... wrote: Why not just allow scrolling instead of paging? Scrolling components can scroll through thousands of items quickly. Suppose there are 100 items and you can only see 10 at a time. So first you see 0-9. When you click the icon you see 10-19. When you click it again you'd see 20-29. So you'd need another icon (previous page instead of next page) to go back to 10-19 and then 0-9. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of veena pandit Sent: Thursday, July 23, 2009 10:22 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Question about a flex component Hi, I am new to Flex. I am looking for help on designing a custom component that will hold a lot of items. When the items exceed the number that are visible in the ui of this horizontal component on the webpage an icon appears, which if you click will show a list of the other components you can click again and restore the ui with that item. Hope you understand what I am talking about. If not please post for clarification. Thanks in advance, Veena
RE: [flexcoders] Re: Question about a flex component
Use any program that can produce a GIF or PNG and draw a left-pointing and a right-pointing triangle. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of veena_kris2003 Sent: Tuesday, July 28, 2009 5:43 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Does anyone know of icons or images I can use in my buttons instead of labeling them Previous and Next. I tried to google it and I did not find anything. Thanks. --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosm...@... wrote: Why not just allow scrolling instead of paging? Scrolling components can scroll through thousands of items quickly. Suppose there are 100 items and you can only see 10 at a time. So first you see 0-9. When you click the icon you see 10-19. When you click it again you'd see 20-29. So you'd need another icon (previous page instead of next page) to go back to 10-19 and then 0-9. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena pandit Sent: Thursday, July 23, 2009 10:22 AM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Question about a flex component Hi, I am new to Flex. I am looking for help on designing a custom component that will hold a lot of items. When the items exceed the number that are visible in the ui of this horizontal component on the webpage an icon appears, which if you click will show a list of the other components you can click again and restore the ui with that item. Hope you understand what I am talking about. If not please post for clarification. Thanks in advance, Veena
[flexcoders] Re: Question about a flex component
How do I remove a specific item from a HorizontalList whose dataprovider is an ArrayCollection? Thanks, --- In flexcoders@yahoogroups.com, Gordon Smith gosm...@... wrote: You add child components which are UIComponents to a container like HBox. But you add data items to a list-based control like HorizontalList. These data items then get displayed by item renderers, which are children which get automatically created to display data items. The children are managed by the list, not by you... you manage the data, not the renderers. By default, data items are expected to have a 'label' property to display, unless you set the labelField or labelFunction of the list component. They can be plain Objects, or instances of data classes, or anything else, but typically they aren't visual components. Here's an example of adding two data items to a list using ActionScript. myList.dataProvider = new ArrayCollection(); var item:Object; item = { label: One, data: 1 }; myList.dataProvider.addItem(item); item = { label: Two, data: 2 }; myList.dataProvider.addItem(item); Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of veena_kris2003 Sent: Friday, July 24, 2009 3:19 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Please help. The items are being added dynamically to the mx:HorizontalList id=test bottom=0 width=100% backgroundColor=0x00 horizontalScrollPolicy=on verticalScrollPolicy=off/ I debugged the code and the items are being added, but I can't see them in the UI. If I change mx:HorizontalList to mx:HBox I can see the items in the UI. What am I doing wrong? --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: No, I don't have an example and don't have time to create one for you since I'm a development engineer, not a support engineer. But here is what you should try, learning as you go: 1. Create an app with an mx:HorizontalList. 2. Make it show data items by assigning its dataProvider. Put in more data items that will fit. 3. Turn off its scrollbar by setting horizontalScrollPolicy=off. 4. Create mx:Buttons for Previous and Next, positioned to the left and right of the HorizontalList. 5. In their 'click' handlers, put code like horizontalList.horizontalScrollPosition += 1. Use -= for the Previous button. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena_kris2003 Sent: Thursday, July 23, 2009 4:42 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Do you mind posting an example. It sounds like this is what I was looking for. I need a horizontal list component with an icon at the right end of the component that I can click and scroll to more items. Thanks, Veena --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: Why not just allow scrolling instead of paging? Scrolling components can scroll through thousands of items quickly. Suppose there are 100 items and you can only see 10 at a time. So first you see 0-9. When you click the icon you see 10-19. When you click it again you'd see 20-29. So you'd need another icon (previous page instead of next page) to go back to 10-19 and then 0-9. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena pandit Sent: Thursday, July 23, 2009 10:22 AM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Question about a flex component Hi, I am new to Flex. I am looking for help on designing a custom component that will hold a lot of items. When the items exceed the number that are visible in the ui of this horizontal component on the webpage an icon appears, which if you click will show a list of the other components you can click again and restore the ui with that item. Hope you understand what I am talking about. If not please post for clarification. Thanks in advance, Veena
RE: [flexcoders] Re: Question about a flex component
The ASDoc for ArrayCollection lists removeItemAt() as an inherited method. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of veena_kris2003 Sent: Tuesday, July 28, 2009 10:59 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Question about a flex component How do I remove a specific item from a HorizontalList whose dataprovider is an ArrayCollection? Thanks, --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosm...@... wrote: You add child components which are UIComponents to a container like HBox. But you add data items to a list-based control like HorizontalList. These data items then get displayed by item renderers, which are children which get automatically created to display data items. The children are managed by the list, not by you... you manage the data, not the renderers. By default, data items are expected to have a 'label' property to display, unless you set the labelField or labelFunction of the list component. They can be plain Objects, or instances of data classes, or anything else, but typically they aren't visual components. Here's an example of adding two data items to a list using ActionScript. myList.dataProvider = new ArrayCollection(); var item:Object; item = { label: One, data: 1 }; myList.dataProvider.addItem(item); item = { label: Two, data: 2 }; myList.dataProvider.addItem(item); Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena_kris2003 Sent: Friday, July 24, 2009 3:19 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Please help. The items are being added dynamically to the mx:HorizontalList id=test bottom=0 width=100% backgroundColor=0x00 horizontalScrollPolicy=on verticalScrollPolicy=off/ I debugged the code and the items are being added, but I can't see them in the UI. If I change mx:HorizontalList to mx:HBox I can see the items in the UI. What am I doing wrong? --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: No, I don't have an example and don't have time to create one for you since I'm a development engineer, not a support engineer. But here is what you should try, learning as you go: 1. Create an app with an mx:HorizontalList. 2. Make it show data items by assigning its dataProvider. Put in more data items that will fit. 3. Turn off its scrollbar by setting horizontalScrollPolicy=off. 4. Create mx:Buttons for Previous and Next, positioned to the left and right of the HorizontalList. 5. In their 'click' handlers, put code like horizontalList.horizontalScrollPosition += 1. Use -= for the Previous button. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena_kris2003 Sent: Thursday, July 23, 2009 4:42 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Do you mind posting an example. It sounds like this is what I was looking for. I need a horizontal list component with an icon at the right end of the component that I can click and scroll to more items. Thanks, Veena --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: Why not just allow scrolling instead of paging? Scrolling components can scroll through thousands of items quickly. Suppose there are 100 items and you can only see 10 at a time. So first you see 0-9. When you click the icon you see 10-19. When you click it again you'd see 20-29. So you'd need another icon (previous page instead of next page) to go back to 10-19 and then 0-9. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena pandit Sent: Thursday, July 23, 2009 10:22 AM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Question about a flex component Hi, I am new to Flex. I am looking for help
[flexcoders] Re: Question about a flex component
How do I extract the data portion of the item if the item looks like Object in the example below. --- In flexcoders@yahoogroups.com, Gordon Smith gosm...@... wrote: You add child components which are UIComponents to a container like HBox. But you add data items to a list-based control like HorizontalList. These data items then get displayed by item renderers, which are children which get automatically created to display data items. The children are managed by the list, not by you... you manage the data, not the renderers. By default, data items are expected to have a 'label' property to display, unless you set the labelField or labelFunction of the list component. They can be plain Objects, or instances of data classes, or anything else, but typically they aren't visual components. Here's an example of adding two data items to a list using ActionScript. myList.dataProvider = new ArrayCollection(); var item:Object; item = { label: One, data: 1 }; myList.dataProvider.addItem(item); item = { label: Two, data: 2 }; myList.dataProvider.addItem(item); Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of veena_kris2003 Sent: Friday, July 24, 2009 3:19 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Please help. The items are being added dynamically to the mx:HorizontalList id=test bottom=0 width=100% backgroundColor=0x00 horizontalScrollPolicy=on verticalScrollPolicy=off/ I debugged the code and the items are being added, but I can't see them in the UI. If I change mx:HorizontalList to mx:HBox I can see the items in the UI. What am I doing wrong? --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: No, I don't have an example and don't have time to create one for you since I'm a development engineer, not a support engineer. But here is what you should try, learning as you go: 1. Create an app with an mx:HorizontalList. 2. Make it show data items by assigning its dataProvider. Put in more data items that will fit. 3. Turn off its scrollbar by setting horizontalScrollPolicy=off. 4. Create mx:Buttons for Previous and Next, positioned to the left and right of the HorizontalList. 5. In their 'click' handlers, put code like horizontalList.horizontalScrollPosition += 1. Use -= for the Previous button. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena_kris2003 Sent: Thursday, July 23, 2009 4:42 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Do you mind posting an example. It sounds like this is what I was looking for. I need a horizontal list component with an icon at the right end of the component that I can click and scroll to more items. Thanks, Veena --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: Why not just allow scrolling instead of paging? Scrolling components can scroll through thousands of items quickly. Suppose there are 100 items and you can only see 10 at a time. So first you see 0-9. When you click the icon you see 10-19. When you click it again you'd see 20-29. So you'd need another icon (previous page instead of next page) to go back to 10-19 and then 0-9. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena pandit Sent: Thursday, July 23, 2009 10:22 AM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Question about a flex component Hi, I am new to Flex. I am looking for help on designing a custom component that will hold a lot of items. When the items exceed the number that are visible in the ui of this horizontal component on the webpage an icon appears, which if you click will show a list of the other components you can click again and restore the ui with that item. Hope you understand what I am talking about. If not please post for clarification. Thanks in advance, Veena
[flexcoders] Re: Question about a flex component
item.data --- In flexcoders@yahoogroups.com, veena_kris2003 v.kri...@... wrote: How do I extract the data portion of the item if the item looks like Object in the example below. --- In flexcoders@yahoogroups.com, Gordon Smith gosmith@ wrote: You add child components which are UIComponents to a container like HBox. But you add data items to a list-based control like HorizontalList. These data items then get displayed by item renderers, which are children which get automatically created to display data items. The children are managed by the list, not by you... you manage the data, not the renderers. By default, data items are expected to have a 'label' property to display, unless you set the labelField or labelFunction of the list component. They can be plain Objects, or instances of data classes, or anything else, but typically they aren't visual components. Here's an example of adding two data items to a list using ActionScript. myList.dataProvider = new ArrayCollection(); var item:Object; item = { label: One, data: 1 }; myList.dataProvider.addItem(item); item = { label: Two, data: 2 }; myList.dataProvider.addItem(item); Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of veena_kris2003 Sent: Friday, July 24, 2009 3:19 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Please help. The items are being added dynamically to the mx:HorizontalList id=test bottom=0 width=100% backgroundColor=0x00 horizontalScrollPolicy=on verticalScrollPolicy=off/ I debugged the code and the items are being added, but I can't see them in the UI. If I change mx:HorizontalList to mx:HBox I can see the items in the UI. What am I doing wrong? --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: No, I don't have an example and don't have time to create one for you since I'm a development engineer, not a support engineer. But here is what you should try, learning as you go: 1. Create an app with an mx:HorizontalList. 2. Make it show data items by assigning its dataProvider. Put in more data items that will fit. 3. Turn off its scrollbar by setting horizontalScrollPolicy=off. 4. Create mx:Buttons for Previous and Next, positioned to the left and right of the HorizontalList. 5. In their 'click' handlers, put code like horizontalList.horizontalScrollPosition += 1. Use -= for the Previous button. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena_kris2003 Sent: Thursday, July 23, 2009 4:42 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Do you mind posting an example. It sounds like this is what I was looking for. I need a horizontal list component with an icon at the right end of the component that I can click and scroll to more items. Thanks, Veena --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: Why not just allow scrolling instead of paging? Scrolling components can scroll through thousands of items quickly. Suppose there are 100 items and you can only see 10 at a time. So first you see 0-9. When you click the icon you see 10-19. When you click it again you'd see 20-29. So you'd need another icon (previous page instead of next page) to go back to 10-19 and then 0-9. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena pandit Sent: Thursday, July 23, 2009 10:22 AM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Question about a flex component Hi, I am new to Flex. I am looking for help on designing a custom component that will hold a lot of items. When the items exceed the number that are visible in the ui of this horizontal component on the webpage an icon appears, which if you click will show a list of the other components you can click again and restore the ui with that item. Hope you understand what I am talking about. If not please post for clarification. Thanks in advance, Veena
Re: [flexcoders] Re: Question about a flex component
What type do i get back? On Tue, Jul 28, 2009 at 2:52 PM, valdhor valdhorli...@embarqmail.comwrote: item.data --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, veena_kris2003 v.kri...@... wrote: How do I extract the data portion of the item if the item looks like Object in the example below. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: You add child components which are UIComponents to a container like HBox. But you add data items to a list-based control like HorizontalList. These data items then get displayed by item renderers, which are children which get automatically created to display data items. The children are managed by the list, not by you... you manage the data, not the renderers. By default, data items are expected to have a 'label' property to display, unless you set the labelField or labelFunction of the list component. They can be plain Objects, or instances of data classes, or anything else, but typically they aren't visual components. Here's an example of adding two data items to a list using ActionScript. myList.dataProvider = new ArrayCollection(); var item:Object; item = { label: One, data: 1 }; myList.dataProvider.addItem(item); item = { label: Two, data: 2 }; myList.dataProvider.addItem(item); Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com[mailto: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On Behalf Of veena_kris2003 Sent: Friday, July 24, 2009 3:19 PM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Please help. The items are being added dynamically to the mx:HorizontalList id=test bottom=0 width=100% backgroundColor=0x00 horizontalScrollPolicy=on verticalScrollPolicy=off/ I debugged the code and the items are being added, but I can't see them in the UI. If I change mx:HorizontalList to mx:HBox I can see the items in the UI. What am I doing wrong? --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com, Gordon Smith gosmith@ wrote: No, I don't have an example and don't have time to create one for you since I'm a development engineer, not a support engineer. But here is what you should try, learning as you go: 1. Create an app with an mx:HorizontalList. 2. Make it show data items by assigning its dataProvider. Put in more data items that will fit. 3. Turn off its scrollbar by setting horizontalScrollPolicy=off. 4. Create mx:Buttons for Previous and Next, positioned to the left and right of the HorizontalList. 5. In their 'click' handlers, put code like horizontalList.horizontalScrollPosition += 1. Use -= for the Previous button. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com [mailto:flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto: flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com] On Behalf Of veena_kris2003 Sent: Thursday, July 23, 2009 4:42 PM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Do you mind posting an example. It sounds like this is what I was looking for. I need a horizontal list component with an icon at the right end of the component that I can click and scroll to more items. Thanks, Veena --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com, Gordon Smith gosmith@ wrote: Why not just allow scrolling instead of paging? Scrolling components can scroll through thousands of items quickly. Suppose there are 100 items and you can only see 10 at a time. So first you see 0-9. When you click the icon you see 10-19. When you click it again you'd see 20-29. So you'd need another icon (previous page instead of next page) to go back to 10-19 and then 0-9. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com [mailto:flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto: flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.commailto: flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com] On Behalf Of veena pandit Sent: Thursday, July 23, 2009 10:22 AM To: flexcoders@yahoogroups.com flexcoders
[flexcoders] Re: Question about a flex component
Looks like an int to me. --- In flexcoders@yahoogroups.com, veena pandit v.kri...@... wrote: What type do i get back? On Tue, Jul 28, 2009 at 2:52 PM, valdhor valdhorli...@...wrote: item.data --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, veena_kris2003 v.kris21@ wrote: How do I extract the data portion of the item if the item looks like Object in the example below. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: You add child components which are UIComponents to a container like HBox. But you add data items to a list-based control like HorizontalList. These data items then get displayed by item renderers, which are children which get automatically created to display data items. The children are managed by the list, not by you... you manage the data, not the renderers. By default, data items are expected to have a 'label' property to display, unless you set the labelField or labelFunction of the list component. They can be plain Objects, or instances of data classes, or anything else, but typically they aren't visual components. Here's an example of adding two data items to a list using ActionScript. myList.dataProvider = new ArrayCollection(); var item:Object; item = { label: One, data: 1 }; myList.dataProvider.addItem(item); item = { label: Two, data: 2 }; myList.dataProvider.addItem(item); Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com[mailto: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On Behalf Of veena_kris2003 Sent: Friday, July 24, 2009 3:19 PM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Please help. The items are being added dynamically to the mx:HorizontalList id=test bottom=0 width=100% backgroundColor=0x00 horizontalScrollPolicy=on verticalScrollPolicy=off/ I debugged the code and the items are being added, but I can't see them in the UI. If I change mx:HorizontalList to mx:HBox I can see the items in the UI. What am I doing wrong? --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com, Gordon Smith gosmith@ wrote: No, I don't have an example and don't have time to create one for you since I'm a development engineer, not a support engineer. But here is what you should try, learning as you go: 1. Create an app with an mx:HorizontalList. 2. Make it show data items by assigning its dataProvider. Put in more data items that will fit. 3. Turn off its scrollbar by setting horizontalScrollPolicy=off. 4. Create mx:Buttons for Previous and Next, positioned to the left and right of the HorizontalList. 5. In their 'click' handlers, put code like horizontalList.horizontalScrollPosition += 1. Use -= for the Previous button. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com [mailto:flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto: flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com] On Behalf Of veena_kris2003 Sent: Thursday, July 23, 2009 4:42 PM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Do you mind posting an example. It sounds like this is what I was looking for. I need a horizontal list component with an icon at the right end of the component that I can click and scroll to more items. Thanks, Veena --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com, Gordon Smith gosmith@ wrote: Why not just allow scrolling instead of paging? Scrolling components can scroll through thousands of items quickly. Suppose there are 100 items and you can only see 10 at a time. So first you see 0-9. When you click the icon you see 10-19. When you click it again you'd see 20-29. So you'd need another icon (previous page instead of next page) to go back to 10-19 and then 0-9. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com [mailto:flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto: flexcoders%40yahoogroups.com flexcoders
RE: [flexcoders] Re: Question about a flex component
The compiler wouldn't have a declaration of 'data', so would assume item.data has type *. At runtime it would have type int if its value is 1. But you could use class to define data items with strongly typed properties: public class MyItem { public var label:String: public var data:int; } and then the compiler would know that 'data' is int at compile-time. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of valdhor Sent: Tuesday, July 28, 2009 11:57 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Looks like an int to me. --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, veena pandit v.kri...@... wrote: What type do i get back? On Tue, Jul 28, 2009 at 2:52 PM, valdhor valdhorli...@...wrote: item.data --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com flexcoders%40yahoogroups.com, veena_kris2003 v.kris21@ wrote: How do I extract the data portion of the item if the item looks like Object in the example below. --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: You add child components which are UIComponents to a container like HBox. But you add data items to a list-based control like HorizontalList. These data items then get displayed by item renderers, which are children which get automatically created to display data items. The children are managed by the list, not by you... you manage the data, not the renderers. By default, data items are expected to have a 'label' property to display, unless you set the labelField or labelFunction of the list component. They can be plain Objects, or instances of data classes, or anything else, but typically they aren't visual components. Here's an example of adding two data items to a list using ActionScript. myList.dataProvider = new ArrayCollection(); var item:Object; item = { label: One, data: 1 }; myList.dataProvider.addItem(item); item = { label: Two, data: 2 }; myList.dataProvider.addItem(item); Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com flexcoders%40yahoogroups.com[mailto: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com flexcoders%40yahoogroups.com] On Behalf Of veena_kris2003 Sent: Friday, July 24, 2009 3:19 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Please help. The items are being added dynamically to the mx:HorizontalList id=test bottom=0 width=100% backgroundColor=0x00 horizontalScrollPolicy=on verticalScrollPolicy=off/ I debugged the code and the items are being added, but I can't see them in the UI. If I change mx:HorizontalList to mx:HBox I can see the items in the UI. What am I doing wrong? --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com, Gordon Smith gosmith@ wrote: No, I don't have an example and don't have time to create one for you since I'm a development engineer, not a support engineer. But here is what you should try, learning as you go: 1. Create an app with an mx:HorizontalList. 2. Make it show data items by assigning its dataProvider. Put in more data items that will fit. 3. Turn off its scrollbar by setting horizontalScrollPolicy=off. 4. Create mx:Buttons for Previous and Next, positioned to the left and right of the HorizontalList. 5. In their 'click' handlers, put code like horizontalList.horizontalScrollPosition += 1. Use -= for the Previous button. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com flexcoders%40yahoogroups.commailto: flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com] On Behalf Of veena_kris2003 Sent: Thursday, July 23, 2009 4:42 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Do you mind posting an example. It sounds like this is what I was looking for. I need a horizontal list component with an icon at the right end of the component that I can click and scroll to more items. Thanks, Veena
[flexcoders] Re: Question about a flex component
There is an example in the documentation of the HorizontalList: http://livedocs.adobe.com/flex/3/langref/mx/controls/HorizontalList.html#includeExamplesSummary --- In flexcoders@yahoogroups.com, veena_kris2003 v.kri...@... wrote: Do you mind posting a complete example? Hope it is not too much to ask. --- In flexcoders@yahoogroups.com, Gordon Smith gosmith@ wrote: Why not just allow scrolling instead of paging? Scrolling components can scroll through thousands of items quickly. Suppose there are 100 items and you can only see 10 at a time. So first you see 0-9. When you click the icon you see 10-19. When you click it again you'd see 20-29. So you'd need another icon (previous page instead of next page) to go back to 10-19 and then 0-9. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of veena pandit Sent: Thursday, July 23, 2009 10:22 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Question about a flex component Hi, I am new to Flex. I am looking for help on designing a custom component that will hold a lot of items. When the items exceed the number that are visible in the ui of this horizontal component on the webpage an icon appears, which if you click will show a list of the other components you can click again and restore the ui with that item. Hope you understand what I am talking about. If not please post for clarification. Thanks in advance, Veena
[flexcoders] Re: Question about a flex component
Hi, Thanks for your answer. Do you mind posting an example? Thanks, Veena --- In flexcoders@yahoogroups.com, Gordon Smith gosm...@... wrote: Why not just allow scrolling instead of paging? Scrolling components can scroll through thousands of items quickly. Suppose there are 100 items and you can only see 10 at a time. So first you see 0-9. When you click the icon you see 10-19. When you click it again you'd see 20-29. So you'd need another icon (previous page instead of next page) to go back to 10-19 and then 0-9. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of veena pandit Sent: Thursday, July 23, 2009 10:22 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Question about a flex component Hi, I am new to Flex. I am looking for help on designing a custom component that will hold a lot of items. When the items exceed the number that are visible in the ui of this horizontal component on the webpage an icon appears, which if you click will show a list of the other components you can click again and restore the ui with that item. Hope you understand what I am talking about. If not please post for clarification. Thanks in advance, Veena
[flexcoders] Re: Question about a flex component
I need an example of code, that dynamically(at runtime) adds objects to a horizontalList and that has eventhandlers for the selected item in the horizontalList. --- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote: There is an example in the documentation of the HorizontalList: http://livedocs.adobe.com/flex/3/langref/mx/controls/HorizontalList.html#includeExamplesSummary --- In flexcoders@yahoogroups.com, veena_kris2003 v.kris21@ wrote: Do you mind posting a complete example? Hope it is not too much to ask. --- In flexcoders@yahoogroups.com, Gordon Smith gosmith@ wrote: Why not just allow scrolling instead of paging? Scrolling components can scroll through thousands of items quickly. Suppose there are 100 items and you can only see 10 at a time. So first you see 0-9. When you click the icon you see 10-19. When you click it again you'd see 20-29. So you'd need another icon (previous page instead of next page) to go back to 10-19 and then 0-9. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of veena pandit Sent: Thursday, July 23, 2009 10:22 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Question about a flex component Hi, I am new to Flex. I am looking for help on designing a custom component that will hold a lot of items. When the items exceed the number that are visible in the ui of this horizontal component on the webpage an icon appears, which if you click will show a list of the other components you can click again and restore the ui with that item. Hope you understand what I am talking about. If not please post for clarification. Thanks in advance, Veena
[flexcoders] Re: Question about a flex component
None of my messages are getting posted on this forum. The dataProvider is a ArrayCollection of cusom objects. I added listeners to each object before I added the object to the horizontal list at runtime. I am not sure how to propogate the events when an item is selected from the horizontal list. --- In flexcoders@yahoogroups.com, Tracy Spratt tr...@... wrote: You must use the collection API to add the items in order for the necessary events to be dispatched to update the UI. What is the data type of you dataProvider? Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of veena_kris2003 Sent: Friday, July 24, 2009 6:19 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Please help. The items are being added dynamically to the mx:HorizontalList id=test bottom=0 width=100% backgroundColor=0x00 horizontalScrollPolicy=on verticalScrollPolicy=off/ I debugged the code and the items are being added, but I can't see them in the UI. If I change mx:HorizontalList to mx:HBox I can see the items in the UI. What am I doing wrong? --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, Gordon Smith gosmith@ wrote: No, I don't have an example and don't have time to create one for you since I'm a development engineer, not a support engineer. But here is what you should try, learning as you go: 1. Create an app with an mx:HorizontalList. 2. Make it show data items by assigning its dataProvider. Put in more data items that will fit. 3. Turn off its scrollbar by setting horizontalScrollPolicy=off. 4. Create mx:Buttons for Previous and Next, positioned to the left and right of the HorizontalList. 5. In their 'click' handlers, put code like horizontalList.horizontalScrollPosition += 1. Use -= for the Previous button. Gordon Smith Adobe Flex SDK Team From: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com [mailto:flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com] On Behalf Of veena_kris2003 Sent: Thursday, July 23, 2009 4:42 PM To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com Subject: [flexcoders] Re: Question about a flex component Do you mind posting an example. It sounds like this is what I was looking for. I need a horizontal list component with an icon at the right end of the component that I can click and scroll to more items. Thanks, Veena --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: Why not just allow scrolling instead of paging? Scrolling components can scroll through thousands of items quickly. Suppose there are 100 items and you can only see 10 at a time. So first you see 0-9. When you click the icon you see 10-19. When you click it again you'd see 20-29. So you'd need another icon (previous page instead of next page) to go back to 10-19 and then 0-9. Gordon Smith Adobe Flex SDK Team From: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.commailto:flexcoders%40yahoogroups.com [mailto:flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena pandit Sent: Thursday, July 23, 2009 10:22 AM To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Question about a flex component Hi, I am new to Flex. I am looking for help on designing a custom component that will hold a lot of items. When the items exceed the number that are visible in the ui of this horizontal component on the webpage an icon appears, which if you click will show a list of the other components you can click again and restore the ui with that item. Hope you understand what I am talking about. If not please post for clarification. Thanks in advance, Veena
[flexcoders] Re: Question about a flex component
I have two problems at this point. I used the following example, to modify my code. But problem 1 is: even though I added an eventListener to the object that I added to the HorizontalList, the eventListener is not getting called when I click on the object in the UI. problem 2 is: the horizontal scroll bar looks wierd, it does not look like it should. How should I proceed? much appreciated, Veena --- In flexcoders@yahoogroups.com, Gordon Smith gosm...@... wrote: You add child components which are UIComponents to a container like HBox. But you add data items to a list-based control like HorizontalList. These data items then get displayed by item renderers, which are children which get automatically created to display data items. The children are managed by the list, not by you... you manage the data, not the renderers. By default, data items are expected to have a 'label' property to display, unless you set the labelField or labelFunction of the list component. They can be plain Objects, or instances of data classes, or anything else, but typically they aren't visual components. Here's an example of adding two data items to a list using ActionScript. myList.dataProvider = new ArrayCollection(); var item:Object; item = { label: One, data: 1 }; myList.dataProvider.addItem(item); item = { label: Two, data: 2 }; myList.dataProvider.addItem(item); Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of veena_kris2003 Sent: Friday, July 24, 2009 3:19 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Please help. The items are being added dynamically to the mx:HorizontalList id=test bottom=0 width=100% backgroundColor=0x00 horizontalScrollPolicy=on verticalScrollPolicy=off/ I debugged the code and the items are being added, but I can't see them in the UI. If I change mx:HorizontalList to mx:HBox I can see the items in the UI. What am I doing wrong? --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: No, I don't have an example and don't have time to create one for you since I'm a development engineer, not a support engineer. But here is what you should try, learning as you go: 1. Create an app with an mx:HorizontalList. 2. Make it show data items by assigning its dataProvider. Put in more data items that will fit. 3. Turn off its scrollbar by setting horizontalScrollPolicy=off. 4. Create mx:Buttons for Previous and Next, positioned to the left and right of the HorizontalList. 5. In their 'click' handlers, put code like horizontalList.horizontalScrollPosition += 1. Use -= for the Previous button. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena_kris2003 Sent: Thursday, July 23, 2009 4:42 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Do you mind posting an example. It sounds like this is what I was looking for. I need a horizontal list component with an icon at the right end of the component that I can click and scroll to more items. Thanks, Veena --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: Why not just allow scrolling instead of paging? Scrolling components can scroll through thousands of items quickly. Suppose there are 100 items and you can only see 10 at a time. So first you see 0-9. When you click the icon you see 10-19. When you click it again you'd see 20-29. So you'd need another icon (previous page instead of next page) to go back to 10-19 and then 0-9. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena pandit Sent: Thursday, July 23, 2009 10:22 AM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Question about a flex component Hi, I am new to Flex. I am looking for help on designing a custom component that will hold a lot of items. When the items exceed the number that are visible in the ui of this horizontal component on the webpage an icon appears, which if you click will show a list of the other components you can click again and restore the ui with that item. Hope you understand what I am talking about. If not please post for clarification. Thanks in advance
[flexcoders] Re: Question about a flex component
My message from earlier today never got posted. How do you add event listeners to objects in the horizontalList. I added the event listeners to the objects before I added the objects to the list. The event listener is not getting called. --- In flexcoders@yahoogroups.com, Gordon Smith gosm...@... wrote: You add child components which are UIComponents to a container like HBox. But you add data items to a list-based control like HorizontalList. These data items then get displayed by item renderers, which are children which get automatically created to display data items. The children are managed by the list, not by you... you manage the data, not the renderers. By default, data items are expected to have a 'label' property to display, unless you set the labelField or labelFunction of the list component. They can be plain Objects, or instances of data classes, or anything else, but typically they aren't visual components. Here's an example of adding two data items to a list using ActionScript. myList.dataProvider = new ArrayCollection(); var item:Object; item = { label: One, data: 1 }; myList.dataProvider.addItem(item); item = { label: Two, data: 2 }; myList.dataProvider.addItem(item); Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of veena_kris2003 Sent: Friday, July 24, 2009 3:19 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Please help. The items are being added dynamically to the mx:HorizontalList id=test bottom=0 width=100% backgroundColor=0x00 horizontalScrollPolicy=on verticalScrollPolicy=off/ I debugged the code and the items are being added, but I can't see them in the UI. If I change mx:HorizontalList to mx:HBox I can see the items in the UI. What am I doing wrong? --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: No, I don't have an example and don't have time to create one for you since I'm a development engineer, not a support engineer. But here is what you should try, learning as you go: 1. Create an app with an mx:HorizontalList. 2. Make it show data items by assigning its dataProvider. Put in more data items that will fit. 3. Turn off its scrollbar by setting horizontalScrollPolicy=off. 4. Create mx:Buttons for Previous and Next, positioned to the left and right of the HorizontalList. 5. In their 'click' handlers, put code like horizontalList.horizontalScrollPosition += 1. Use -= for the Previous button. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena_kris2003 Sent: Thursday, July 23, 2009 4:42 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Do you mind posting an example. It sounds like this is what I was looking for. I need a horizontal list component with an icon at the right end of the component that I can click and scroll to more items. Thanks, Veena --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: Why not just allow scrolling instead of paging? Scrolling components can scroll through thousands of items quickly. Suppose there are 100 items and you can only see 10 at a time. So first you see 0-9. When you click the icon you see 10-19. When you click it again you'd see 20-29. So you'd need another icon (previous page instead of next page) to go back to 10-19 and then 0-9. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena pandit Sent: Thursday, July 23, 2009 10:22 AM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Question about a flex component Hi, I am new to Flex. I am looking for help on designing a custom component that will hold a lot of items. When the items exceed the number that are visible in the ui of this horizontal component on the webpage an icon appears, which if you click will show a list of the other components you can click again and restore the ui with that item. Hope you understand what I am talking about. If not please post for clarification. Thanks in advance, Veena
RE: [flexcoders] Re: Question about a flex component
That's not how list-based components work. You don't add event listeners to data items. You listen to events dispatched by the list itself. What are you trying to accomplish with your event handlers? Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of veena_kris2003 Sent: Saturday, July 25, 2009 3:52 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Question about a flex component My message from earlier today never got posted. How do you add event listeners to objects in the horizontalList. I added the event listeners to the objects before I added the objects to the list. The event listener is not getting called. --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosm...@... wrote: You add child components which are UIComponents to a container like HBox. But you add data items to a list-based control like HorizontalList. These data items then get displayed by item renderers, which are children which get automatically created to display data items. The children are managed by the list, not by you... you manage the data, not the renderers. By default, data items are expected to have a 'label' property to display, unless you set the labelField or labelFunction of the list component. They can be plain Objects, or instances of data classes, or anything else, but typically they aren't visual components. Here's an example of adding two data items to a list using ActionScript. myList.dataProvider = new ArrayCollection(); var item:Object; item = { label: One, data: 1 }; myList.dataProvider.addItem(item); item = { label: Two, data: 2 }; myList.dataProvider.addItem(item); Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena_kris2003 Sent: Friday, July 24, 2009 3:19 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Please help. The items are being added dynamically to the mx:HorizontalList id=test bottom=0 width=100% backgroundColor=0x00 horizontalScrollPolicy=on verticalScrollPolicy=off/ I debugged the code and the items are being added, but I can't see them in the UI. If I change mx:HorizontalList to mx:HBox I can see the items in the UI. What am I doing wrong? --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: No, I don't have an example and don't have time to create one for you since I'm a development engineer, not a support engineer. But here is what you should try, learning as you go: 1. Create an app with an mx:HorizontalList. 2. Make it show data items by assigning its dataProvider. Put in more data items that will fit. 3. Turn off its scrollbar by setting horizontalScrollPolicy=off. 4. Create mx:Buttons for Previous and Next, positioned to the left and right of the HorizontalList. 5. In their 'click' handlers, put code like horizontalList.horizontalScrollPosition += 1. Use -= for the Previous button. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena_kris2003 Sent: Thursday, July 23, 2009 4:42 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Do you mind posting an example. It sounds like this is what I was looking for. I need a horizontal list component with an icon at the right end of the component that I can click and scroll to more items. Thanks, Veena --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: Why not just allow scrolling instead of paging? Scrolling components can scroll through thousands of items quickly. Suppose there are 100 items and you can only see 10 at a time. So first you see 0-9. When you click the icon you see 10-19. When you click it again you'd see 20-29. So you'd need another icon (previous page instead of next page) to go back to 10-19 and then 0-9. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena pandit Sent: Thursday, July 23, 2009 10:22 AM
[flexcoders] Re: Question about a flex component
I fixed it so that I called the change=horizontalScrollListChange(event). Then I pass in a ListEvent to the horizontalScrollListChange method. Can I dispatch a MouseEvent from the horizontalScrollListChange method? --- In flexcoders@yahoogroups.com, Gordon Smith gosm...@... wrote: That's not how list-based components work. You don't add event listeners to data items. You listen to events dispatched by the list itself. What are you trying to accomplish with your event handlers? Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of veena_kris2003 Sent: Saturday, July 25, 2009 3:52 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Question about a flex component My message from earlier today never got posted. How do you add event listeners to objects in the horizontalList. I added the event listeners to the objects before I added the objects to the list. The event listener is not getting called. --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: You add child components which are UIComponents to a container like HBox. But you add data items to a list-based control like HorizontalList. These data items then get displayed by item renderers, which are children which get automatically created to display data items. The children are managed by the list, not by you... you manage the data, not the renderers. By default, data items are expected to have a 'label' property to display, unless you set the labelField or labelFunction of the list component. They can be plain Objects, or instances of data classes, or anything else, but typically they aren't visual components. Here's an example of adding two data items to a list using ActionScript. myList.dataProvider = new ArrayCollection(); var item:Object; item = { label: One, data: 1 }; myList.dataProvider.addItem(item); item = { label: Two, data: 2 }; myList.dataProvider.addItem(item); Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena_kris2003 Sent: Friday, July 24, 2009 3:19 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Please help. The items are being added dynamically to the mx:HorizontalList id=test bottom=0 width=100% backgroundColor=0x00 horizontalScrollPolicy=on verticalScrollPolicy=off/ I debugged the code and the items are being added, but I can't see them in the UI. If I change mx:HorizontalList to mx:HBox I can see the items in the UI. What am I doing wrong? --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: No, I don't have an example and don't have time to create one for you since I'm a development engineer, not a support engineer. But here is what you should try, learning as you go: 1. Create an app with an mx:HorizontalList. 2. Make it show data items by assigning its dataProvider. Put in more data items that will fit. 3. Turn off its scrollbar by setting horizontalScrollPolicy=off. 4. Create mx:Buttons for Previous and Next, positioned to the left and right of the HorizontalList. 5. In their 'click' handlers, put code like horizontalList.horizontalScrollPosition += 1. Use -= for the Previous button. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena_kris2003 Sent: Thursday, July 23, 2009 4:42 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Do you mind posting an example. It sounds like this is what I was looking for. I need a horizontal list component with an icon at the right end of the component that I can click and scroll to more items. Thanks, Veena --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: Why not just allow scrolling instead of paging? Scrolling components can scroll through thousands of items quickly. Suppose there are 100 items and you can only see 10 at a time. So first you see 0-9. When you click the icon you see 10-19. When you click it again you'd see 20-29. So you'd need another icon (previous page instead of next page) to go back to 10-19 and then 0-9
RE: [flexcoders] Re: Question about a flex component
Normally only the Player dispatches MouseEvents, in response to the user using the mouse. Why would you want to dispatch a MouseEvent in your code? Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of veena_kris2003 Sent: Monday, July 27, 2009 3:44 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Question about a flex component I fixed it so that I called the change=horizontalScrollListChange(event). Then I pass in a ListEvent to the horizontalScrollListChange method. Can I dispatch a MouseEvent from the horizontalScrollListChange method? --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosm...@... wrote: That's not how list-based components work. You don't add event listeners to data items. You listen to events dispatched by the list itself. What are you trying to accomplish with your event handlers? Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena_kris2003 Sent: Saturday, July 25, 2009 3:52 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Question about a flex component My message from earlier today never got posted. How do you add event listeners to objects in the horizontalList. I added the event listeners to the objects before I added the objects to the list. The event listener is not getting called. --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: You add child components which are UIComponents to a container like HBox. But you add data items to a list-based control like HorizontalList. These data items then get displayed by item renderers, which are children which get automatically created to display data items. The children are managed by the list, not by you... you manage the data, not the renderers. By default, data items are expected to have a 'label' property to display, unless you set the labelField or labelFunction of the list component. They can be plain Objects, or instances of data classes, or anything else, but typically they aren't visual components. Here's an example of adding two data items to a list using ActionScript. myList.dataProvider = new ArrayCollection(); var item:Object; item = { label: One, data: 1 }; myList.dataProvider.addItem(item); item = { label: Two, data: 2 }; myList.dataProvider.addItem(item); Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena_kris2003 Sent: Friday, July 24, 2009 3:19 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Please help. The items are being added dynamically to the mx:HorizontalList id=test bottom=0 width=100% backgroundColor=0x00 horizontalScrollPolicy=on verticalScrollPolicy=off/ I debugged the code and the items are being added, but I can't see them in the UI. If I change mx:HorizontalList to mx:HBox I can see the items in the UI. What am I doing wrong? --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: No, I don't have an example and don't have time to create one for you since I'm a development engineer, not a support engineer. But here is what you should try, learning as you go: 1. Create an app with an mx:HorizontalList. 2. Make it show data items by assigning its dataProvider. Put in more data items that will fit. 3. Turn off its scrollbar by setting horizontalScrollPolicy=off. 4. Create mx:Buttons for Previous and Next, positioned to the left and right of the HorizontalList. 5. In their 'click' handlers, put code like horizontalList.horizontalScrollPosition += 1. Use -= for the Previous button. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena_kris2003 Sent: Thursday, July 23, 2009 4:42 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Do you mind
Re: [flexcoders] Re: Question about a flex component
It is really complex code. I don't understand it yet. On Mon, Jul 27, 2009 at 7:02 PM, Gordon Smith gosm...@adobe.com wrote: Normally only the Player dispatches MouseEvents, in response to the user using the mouse. Why would you want to dispatch a MouseEvent in your code? Gordon Smith Adobe Flex SDK Team *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *veena_kris2003 *Sent:* Monday, July 27, 2009 3:44 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Re: Question about a flex component I fixed it so that I called the change=horizontalScrollListChange(event). Then I pass in a ListEvent to the horizontalScrollListChange method. Can I dispatch a MouseEvent from the horizontalScrollListChange method? --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Gordon Smith gosm...@... wrote: That's not how list-based components work. You don't add event listeners to data items. You listen to events dispatched by the list itself. What are you trying to accomplish with your event handlers? Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com [mailto: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On Behalf Of veena_kris2003 Sent: Saturday, July 25, 2009 3:52 PM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Question about a flex component My message from earlier today never got posted. How do you add event listeners to objects in the horizontalList. I added the event listeners to the objects before I added the objects to the list. The event listener is not getting called. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto: flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com, Gordon Smith gosmith@ wrote: You add child components which are UIComponents to a container like HBox. But you add data items to a list-based control like HorizontalList. These data items then get displayed by item renderers, which are children which get automatically created to display data items. The children are managed by the list, not by you... you manage the data, not the renderers. By default, data items are expected to have a 'label' property to display, unless you set the labelField or labelFunction of the list component. They can be plain Objects, or instances of data classes, or anything else, but typically they aren't visual components. Here's an example of adding two data items to a list using ActionScript. myList.dataProvider = new ArrayCollection(); var item:Object; item = { label: One, data: 1 }; myList.dataProvider.addItem(item); item = { label: Two, data: 2 }; myList.dataProvider.addItem(item); Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com [mailto:flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto: flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com] On Behalf Of veena_kris2003 Sent: Friday, July 24, 2009 3:19 PM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto: flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Please help. The items are being added dynamically to the mx:HorizontalList id=test bottom=0 width=100% backgroundColor=0x00 horizontalScrollPolicy=on verticalScrollPolicy=off/ I debugged the code and the items are being added, but I can't see them in the UI. If I change mx:HorizontalList to mx:HBox I can see the items in the UI. What am I doing wrong? --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com, Gordon Smith gosmith@ wrote: No, I don't have an example and don't have time to create one for you since I'm a development engineer, not a support engineer. But here is what you should try, learning as you go: 1. Create an app with an mx:HorizontalList. 2. Make it show data items by assigning its dataProvider. Put in more data items that will fit. 3. Turn off its scrollbar by setting horizontalScrollPolicy=off. 4. Create mx:Buttons for Previous and Next, positioned to the left and right of the HorizontalList. 5. In their 'click' handlers, put code like horizontalList.horizontalScrollPosition += 1. Use -= for the Previous button. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com [mailto:flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto: flexcoders
RE: [flexcoders] Re: Question about a flex component
You can try dispatching MouseEvents, but I'm not sure that they'll work exactly the same as a Player-generated one. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of veena pandit Sent: Monday, July 27, 2009 4:17 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Question about a flex component It is really complex code. I don't understand it yet. On Mon, Jul 27, 2009 at 7:02 PM, Gordon Smith gosm...@adobe.commailto:gosm...@adobe.com wrote: Normally only the Player dispatches MouseEvents, in response to the user using the mouse. Why would you want to dispatch a MouseEvent in your code? Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com] On Behalf Of veena_kris2003 Sent: Monday, July 27, 2009 3:44 PM To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com Subject: [flexcoders] Re: Question about a flex component I fixed it so that I called the change=horizontalScrollListChange(event). Then I pass in a ListEvent to the horizontalScrollListChange method. Can I dispatch a MouseEvent from the horizontalScrollListChange method? --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosm...@... wrote: That's not how list-based components work. You don't add event listeners to data items. You listen to events dispatched by the list itself. What are you trying to accomplish with your event handlers? Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena_kris2003 Sent: Saturday, July 25, 2009 3:52 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Question about a flex component My message from earlier today never got posted. How do you add event listeners to objects in the horizontalList. I added the event listeners to the objects before I added the objects to the list. The event listener is not getting called. --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%2540yahoogroups.com, Gordon Smith gosmith@ wrote: You add child components which are UIComponents to a container like HBox. But you add data items to a list-based control like HorizontalList. These data items then get displayed by item renderers, which are children which get automatically created to display data items. The children are managed by the list, not by you... you manage the data, not the renderers. By default, data items are expected to have a 'label' property to display, unless you set the labelField or labelFunction of the list component. They can be plain Objects, or instances of data classes, or anything else, but typically they aren't visual components. Here's an example of adding two data items to a list using ActionScript. myList.dataProvider = new ArrayCollection(); var item:Object; item = { label: One, data: 1 }; myList.dataProvider.addItem(item); item = { label: Two, data: 2 }; myList.dataProvider.addItem(item); Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%2540yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%2540yahoogroups.com] On Behalf Of veena_kris2003 Sent: Friday, July 24, 2009 3:19 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%2540yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Please help. The items are being added dynamically to the mx:HorizontalList id=test bottom=0 width=100% backgroundColor=0x00 horizontalScrollPolicy=on verticalScrollPolicy=off/ I debugged the code and the items are being added, but I can't see them in the UI. If I change mx:HorizontalList to mx:HBox I can see the items in the UI. What am I doing wrong? --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%2540yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%2540yahoogroups.com, Gordon Smith gosmith@ wrote: No, I don't have an example and don't have time to create one for you since I'm a development engineer, not a support engineer. But here is what you should try, learning as you go: 1. Create an app with an mx:HorizontalList. 2. Make it show data items by assigning its dataProvider. Put in more data items that will fit. 3. Turn off its scrollbar by setting horizontalScrollPolicy=off. 4. Create
Re: [flexcoders] Re: Question about a flex component
I'll try it. So how would I do it? On Mon, Jul 27, 2009 at 7:25 PM, Gordon Smith gosm...@adobe.com wrote: You can try dispatching MouseEvents, but I'm not sure that they'll work exactly the same as a Player-generated one. Gordon Smith Adobe Flex SDK Team *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *veena pandit *Sent:* Monday, July 27, 2009 4:17 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Re: Question about a flex component It is really complex code. I don't understand it yet. On Mon, Jul 27, 2009 at 7:02 PM, Gordon Smith gosm...@adobe.com wrote: Normally only the Player dispatches MouseEvents, in response to the user using the mouse. Why would you want to dispatch a MouseEvent in your code? Gordon Smith Adobe Flex SDK Team *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *veena_kris2003 *Sent:* Monday, July 27, 2009 3:44 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Re: Question about a flex component I fixed it so that I called the change=horizontalScrollListChange(event). Then I pass in a ListEvent to the horizontalScrollListChange method. Can I dispatch a MouseEvent from the horizontalScrollListChange method? --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Gordon Smith gosm...@... wrote: That's not how list-based components work. You don't add event listeners to data items. You listen to events dispatched by the list itself. What are you trying to accomplish with your event handlers? Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com [mailto: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On Behalf Of veena_kris2003 Sent: Saturday, July 25, 2009 3:52 PM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Question about a flex component My message from earlier today never got posted. How do you add event listeners to objects in the horizontalList. I added the event listeners to the objects before I added the objects to the list. The event listener is not getting called. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto: flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com, Gordon Smith gosmith@ wrote: You add child components which are UIComponents to a container like HBox. But you add data items to a list-based control like HorizontalList. These data items then get displayed by item renderers, which are children which get automatically created to display data items. The children are managed by the list, not by you... you manage the data, not the renderers. By default, data items are expected to have a 'label' property to display, unless you set the labelField or labelFunction of the list component. They can be plain Objects, or instances of data classes, or anything else, but typically they aren't visual components. Here's an example of adding two data items to a list using ActionScript. myList.dataProvider = new ArrayCollection(); var item:Object; item = { label: One, data: 1 }; myList.dataProvider.addItem(item); item = { label: Two, data: 2 }; myList.dataProvider.addItem(item); Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com [mailto:flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto: flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com] On Behalf Of veena_kris2003 Sent: Friday, July 24, 2009 3:19 PM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto: flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Please help. The items are being added dynamically to the mx:HorizontalList id=test bottom=0 width=100% backgroundColor=0x00 horizontalScrollPolicy=on verticalScrollPolicy=off/ I debugged the code and the items are being added, but I can't see them in the UI. If I change mx:HorizontalList to mx:HBox I can see the items in the UI. What am I doing wrong? --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com mailto:flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com, Gordon Smith gosmith@ wrote: No, I don't have an example and don't have time to create one for you since I'm a development engineer, not a support engineer. But here is what you should try, learning as you go: 1. Create an app with an mx:HorizontalList. 2. Make it show data items by assigning its dataProvider. Put in more data items that will fit. 3. Turn off its scrollbar by setting horizontalScrollPolicy=off. 4. Create mx:Buttons for Previous and Next
RE: [flexcoders] Re: Question about a flex component
The same way you dispatch any other event: Construct the Event instance, set its properties, and then call dispatchEvent() on the object that the event should be dispatched from (which generally is 'this'): var mouseEvent:MouseEvent = new MouseEvent(MouseEvent.MOUSE_DOWN); mouseEvent.localX = 10; mouseEvent.localY = 10; ... someComponent.dispatchEvent(mouseEvent); Gordon Smith Adeobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of veena pandit Sent: Monday, July 27, 2009 4:46 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Question about a flex component I'll try it. So how would I do it? On Mon, Jul 27, 2009 at 7:25 PM, Gordon Smith gosm...@adobe.commailto:gosm...@adobe.com wrote: You can try dispatching MouseEvents, but I'm not sure that they'll work exactly the same as a Player-generated one. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com] On Behalf Of veena pandit Sent: Monday, July 27, 2009 4:17 PM To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Question about a flex component It is really complex code. I don't understand it yet. On Mon, Jul 27, 2009 at 7:02 PM, Gordon Smith gosm...@adobe.commailto:gosm...@adobe.com wrote: Normally only the Player dispatches MouseEvents, in response to the user using the mouse. Why would you want to dispatch a MouseEvent in your code? Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com] On Behalf Of veena_kris2003 Sent: Monday, July 27, 2009 3:44 PM To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com Subject: [flexcoders] Re: Question about a flex component I fixed it so that I called the change=horizontalScrollListChange(event). Then I pass in a ListEvent to the horizontalScrollListChange method. Can I dispatch a MouseEvent from the horizontalScrollListChange method? --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosm...@... wrote: That's not how list-based components work. You don't add event listeners to data items. You listen to events dispatched by the list itself. What are you trying to accomplish with your event handlers? Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena_kris2003 Sent: Saturday, July 25, 2009 3:52 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Question about a flex component My message from earlier today never got posted. How do you add event listeners to objects in the horizontalList. I added the event listeners to the objects before I added the objects to the list. The event listener is not getting called. --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%2540yahoogroups.com, Gordon Smith gosmith@ wrote: You add child components which are UIComponents to a container like HBox. But you add data items to a list-based control like HorizontalList. These data items then get displayed by item renderers, which are children which get automatically created to display data items. The children are managed by the list, not by you... you manage the data, not the renderers. By default, data items are expected to have a 'label' property to display, unless you set the labelField or labelFunction of the list component. They can be plain Objects, or instances of data classes, or anything else, but typically they aren't visual components. Here's an example of adding two data items to a list using ActionScript. myList.dataProvider = new ArrayCollection(); var item:Object; item = { label: One, data: 1 }; myList.dataProvider.addItem(item); item = { label: Two, data: 2 }; myList.dataProvider.addItem(item); Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%2540yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%2540yahoogroups.com] On Behalf Of veena_kris2003 Sent: Friday, July 24, 2009 3:19 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%2540yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Please help. The items are being added dynamically to the mx:HorizontalList id=test bottom=0 width=100% backgroundColor=0x00 horizontalScrollPolicy=on verticalScrollPolicy
[flexcoders] Re: Question about a flex component
Do you mind posting an example. It sounds like this is what I was looking for. I need a horizontal list component with an icon at the right end of the component that I can click and scroll to more items. Thanks, Veena --- In flexcoders@yahoogroups.com, Gordon Smith gosm...@... wrote: Why not just allow scrolling instead of paging? Scrolling components can scroll through thousands of items quickly. Suppose there are 100 items and you can only see 10 at a time. So first you see 0-9. When you click the icon you see 10-19. When you click it again you'd see 20-29. So you'd need another icon (previous page instead of next page) to go back to 10-19 and then 0-9. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of veena pandit Sent: Thursday, July 23, 2009 10:22 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Question about a flex component Hi, I am new to Flex. I am looking for help on designing a custom component that will hold a lot of items. When the items exceed the number that are visible in the ui of this horizontal component on the webpage an icon appears, which if you click will show a list of the other components you can click again and restore the ui with that item. Hope you understand what I am talking about. If not please post for clarification. Thanks in advance, Veena
[flexcoders] Re: Question about a flex component
Do you mind posting a complete example? Hope it is not too much to ask. --- In flexcoders@yahoogroups.com, Gordon Smith gosm...@... wrote: Why not just allow scrolling instead of paging? Scrolling components can scroll through thousands of items quickly. Suppose there are 100 items and you can only see 10 at a time. So first you see 0-9. When you click the icon you see 10-19. When you click it again you'd see 20-29. So you'd need another icon (previous page instead of next page) to go back to 10-19 and then 0-9. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of veena pandit Sent: Thursday, July 23, 2009 10:22 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Question about a flex component Hi, I am new to Flex. I am looking for help on designing a custom component that will hold a lot of items. When the items exceed the number that are visible in the ui of this horizontal component on the webpage an icon appears, which if you click will show a list of the other components you can click again and restore the ui with that item. Hope you understand what I am talking about. If not please post for clarification. Thanks in advance, Veena
RE: [flexcoders] Re: Question about a flex component
No, I don't have an example and don't have time to create one for you since I'm a development engineer, not a support engineer. But here is what you should try, learning as you go: 1. Create an app with an mx:HorizontalList. 2. Make it show data items by assigning its dataProvider. Put in more data items that will fit. 3. Turn off its scrollbar by setting horizontalScrollPolicy=off. 4. Create mx:Buttons for Previous and Next, positioned to the left and right of the HorizontalList. 5. In their 'click' handlers, put code like horizontalList.horizontalScrollPosition += 1. Use -= for the Previous button. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of veena_kris2003 Sent: Thursday, July 23, 2009 4:42 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Do you mind posting an example. It sounds like this is what I was looking for. I need a horizontal list component with an icon at the right end of the component that I can click and scroll to more items. Thanks, Veena --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosm...@... wrote: Why not just allow scrolling instead of paging? Scrolling components can scroll through thousands of items quickly. Suppose there are 100 items and you can only see 10 at a time. So first you see 0-9. When you click the icon you see 10-19. When you click it again you'd see 20-29. So you'd need another icon (previous page instead of next page) to go back to 10-19 and then 0-9. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena pandit Sent: Thursday, July 23, 2009 10:22 AM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Question about a flex component Hi, I am new to Flex. I am looking for help on designing a custom component that will hold a lot of items. When the items exceed the number that are visible in the ui of this horizontal component on the webpage an icon appears, which if you click will show a list of the other components you can click again and restore the ui with that item. Hope you understand what I am talking about. If not please post for clarification. Thanks in advance, Veena
[flexcoders] Re: Question about a flex component
When I have an HBox component and I dynamically add items, items get added, but when I have a HorizontalList and I dynamically add items, nothing gets added. The item I am trying to add is a class that extends mx.core.UIComponent. Thanks, Veena --- In flexcoders@yahoogroups.com, Gordon Smith gosm...@... wrote: No, I don't have an example and don't have time to create one for you since I'm a development engineer, not a support engineer. But here is what you should try, learning as you go: 1. Create an app with an mx:HorizontalList. 2. Make it show data items by assigning its dataProvider. Put in more data items that will fit. 3. Turn off its scrollbar by setting horizontalScrollPolicy=off. 4. Create mx:Buttons for Previous and Next, positioned to the left and right of the HorizontalList. 5. In their 'click' handlers, put code like horizontalList.horizontalScrollPosition += 1. Use -= for the Previous button. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of veena_kris2003 Sent: Thursday, July 23, 2009 4:42 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Do you mind posting an example. It sounds like this is what I was looking for. I need a horizontal list component with an icon at the right end of the component that I can click and scroll to more items. Thanks, Veena --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: Why not just allow scrolling instead of paging? Scrolling components can scroll through thousands of items quickly. Suppose there are 100 items and you can only see 10 at a time. So first you see 0-9. When you click the icon you see 10-19. When you click it again you'd see 20-29. So you'd need another icon (previous page instead of next page) to go back to 10-19 and then 0-9. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena pandit Sent: Thursday, July 23, 2009 10:22 AM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Question about a flex component Hi, I am new to Flex. I am looking for help on designing a custom component that will hold a lot of items. When the items exceed the number that are visible in the ui of this horizontal component on the webpage an icon appears, which if you click will show a list of the other components you can click again and restore the ui with that item. Hope you understand what I am talking about. If not please post for clarification. Thanks in advance, Veena
[flexcoders] Re: Question about a flex component
Please help. The items are being added dynamically to the mx:HorizontalList id=test bottom=0 width=100% backgroundColor=0x00 horizontalScrollPolicy=on verticalScrollPolicy=off/ I debugged the code and the items are being added, but I can't see them in the UI. If I change mx:HorizontalList to mx:HBox I can see the items in the UI. What am I doing wrong? --- In flexcoders@yahoogroups.com, Gordon Smith gosm...@... wrote: No, I don't have an example and don't have time to create one for you since I'm a development engineer, not a support engineer. But here is what you should try, learning as you go: 1. Create an app with an mx:HorizontalList. 2. Make it show data items by assigning its dataProvider. Put in more data items that will fit. 3. Turn off its scrollbar by setting horizontalScrollPolicy=off. 4. Create mx:Buttons for Previous and Next, positioned to the left and right of the HorizontalList. 5. In their 'click' handlers, put code like horizontalList.horizontalScrollPosition += 1. Use -= for the Previous button. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of veena_kris2003 Sent: Thursday, July 23, 2009 4:42 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Do you mind posting an example. It sounds like this is what I was looking for. I need a horizontal list component with an icon at the right end of the component that I can click and scroll to more items. Thanks, Veena --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: Why not just allow scrolling instead of paging? Scrolling components can scroll through thousands of items quickly. Suppose there are 100 items and you can only see 10 at a time. So first you see 0-9. When you click the icon you see 10-19. When you click it again you'd see 20-29. So you'd need another icon (previous page instead of next page) to go back to 10-19 and then 0-9. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena pandit Sent: Thursday, July 23, 2009 10:22 AM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Question about a flex component Hi, I am new to Flex. I am looking for help on designing a custom component that will hold a lot of items. When the items exceed the number that are visible in the ui of this horizontal component on the webpage an icon appears, which if you click will show a list of the other components you can click again and restore the ui with that item. Hope you understand what I am talking about. If not please post for clarification. Thanks in advance, Veena
RE: [flexcoders] Re: Question about a flex component
You must use the collection API to add the items in order for the necessary events to be dispatched to update the UI. What is the data type of you dataProvider? Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of veena_kris2003 Sent: Friday, July 24, 2009 6:19 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Please help. The items are being added dynamically to the mx:HorizontalList id=test bottom=0 width=100% backgroundColor=0x00 horizontalScrollPolicy=on verticalScrollPolicy=off/ I debugged the code and the items are being added, but I can't see them in the UI. If I change mx:HorizontalList to mx:HBox I can see the items in the UI. What am I doing wrong? --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, Gordon Smith gosm...@... wrote: No, I don't have an example and don't have time to create one for you since I'm a development engineer, not a support engineer. But here is what you should try, learning as you go: 1. Create an app with an mx:HorizontalList. 2. Make it show data items by assigning its dataProvider. Put in more data items that will fit. 3. Turn off its scrollbar by setting horizontalScrollPolicy=off. 4. Create mx:Buttons for Previous and Next, positioned to the left and right of the HorizontalList. 5. In their 'click' handlers, put code like horizontalList.horizontalScrollPosition += 1. Use -= for the Previous button. Gordon Smith Adobe Flex SDK Team From: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com [mailto:flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com] On Behalf Of veena_kris2003 Sent: Thursday, July 23, 2009 4:42 PM To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com Subject: [flexcoders] Re: Question about a flex component Do you mind posting an example. It sounds like this is what I was looking for. I need a horizontal list component with an icon at the right end of the component that I can click and scroll to more items. Thanks, Veena --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: Why not just allow scrolling instead of paging? Scrolling components can scroll through thousands of items quickly. Suppose there are 100 items and you can only see 10 at a time. So first you see 0-9. When you click the icon you see 10-19. When you click it again you'd see 20-29. So you'd need another icon (previous page instead of next page) to go back to 10-19 and then 0-9. Gordon Smith Adobe Flex SDK Team From: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.commailto:flexcoders%40yahoogroups.com [mailto:flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena pandit Sent: Thursday, July 23, 2009 10:22 AM To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Question about a flex component Hi, I am new to Flex. I am looking for help on designing a custom component that will hold a lot of items. When the items exceed the number that are visible in the ui of this horizontal component on the webpage an icon appears, which if you click will show a list of the other components you can click again and restore the ui with that item. Hope you understand what I am talking about. If not please post for clarification. Thanks in advance, Veena
RE: [flexcoders] Re: Question about a flex component
You add child components which are UIComponents to a container like HBox. But you add data items to a list-based control like HorizontalList. These data items then get displayed by item renderers, which are children which get automatically created to display data items. The children are managed by the list, not by you... you manage the data, not the renderers. By default, data items are expected to have a 'label' property to display, unless you set the labelField or labelFunction of the list component. They can be plain Objects, or instances of data classes, or anything else, but typically they aren't visual components. Here's an example of adding two data items to a list using ActionScript. myList.dataProvider = new ArrayCollection(); var item:Object; item = { label: One, data: 1 }; myList.dataProvider.addItem(item); item = { label: Two, data: 2 }; myList.dataProvider.addItem(item); Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of veena_kris2003 Sent: Friday, July 24, 2009 3:19 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Please help. The items are being added dynamically to the mx:HorizontalList id=test bottom=0 width=100% backgroundColor=0x00 horizontalScrollPolicy=on verticalScrollPolicy=off/ I debugged the code and the items are being added, but I can't see them in the UI. If I change mx:HorizontalList to mx:HBox I can see the items in the UI. What am I doing wrong? --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosm...@... wrote: No, I don't have an example and don't have time to create one for you since I'm a development engineer, not a support engineer. But here is what you should try, learning as you go: 1. Create an app with an mx:HorizontalList. 2. Make it show data items by assigning its dataProvider. Put in more data items that will fit. 3. Turn off its scrollbar by setting horizontalScrollPolicy=off. 4. Create mx:Buttons for Previous and Next, positioned to the left and right of the HorizontalList. 5. In their 'click' handlers, put code like horizontalList.horizontalScrollPosition += 1. Use -= for the Previous button. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena_kris2003 Sent: Thursday, July 23, 2009 4:42 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Question about a flex component Do you mind posting an example. It sounds like this is what I was looking for. I need a horizontal list component with an icon at the right end of the component that I can click and scroll to more items. Thanks, Veena --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com, Gordon Smith gosmith@ wrote: Why not just allow scrolling instead of paging? Scrolling components can scroll through thousands of items quickly. Suppose there are 100 items and you can only see 10 at a time. So first you see 0-9. When you click the icon you see 10-19. When you click it again you'd see 20-29. So you'd need another icon (previous page instead of next page) to go back to 10-19 and then 0-9. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of veena pandit Sent: Thursday, July 23, 2009 10:22 AM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Question about a flex component Hi, I am new to Flex. I am looking for help on designing a custom component that will hold a lot of items. When the items exceed the number that are visible in the ui of this horizontal component on the webpage an icon appears, which if you click will show a list of the other components you can click again and restore the ui with that item. Hope you understand what I am talking about. If not please post for clarification. Thanks in advance, Veena