I’m quite new to flex and ActionScript and I’d like to create a custom component acting as a calendar (using a Sprite), in which the calendar events are represented as rectangles the user can interact with (click to get information about the event, drag and drop for setting start and end dates…). It seems that using a subclass of DataGroup is a good way to do it, but some things are obscure to me…
For example, how should I use the Sprite? as a child of the DataGroup? Also, the calendar events will be drawn using a custom ItemRenderer, and I will have to use a BasicLayout in my DataGroup, but where should I tell that an ItemRenderer should draw its rectangle in the Sprite at the corresponding (x,y) coordinates?
Just bind the itemRenderer’s x and y to something in the data that tells it where the x and y is. If this is not part of the data, consider using a TileLayout instead.