[flexcoders] Re: Flex Project Management App
You can create a array of component names such as; spark.components.Button spark.components.TextInput spark.components.CheckBox spark.components.Label spark.components.RadioButton spark.components.DropDownList mx.controls.DataGrid spark.components.TextArea mx.controls.DateField then pass want you want into this function; private function makeElement(className:String, COMPONENTID:String):UIComponent { var objClass:Class = getDefinitionByName( className ) as Class; if( objClass != null ) { var newObject:UIComponent = UIComponent( new objClass() ); newObject.id = COMPONENTID; newObject.name = COMPONENTID; return newObject; } else return null; } then create a switch that looks at the resulting element and add any styles, or other properties to the element, or other elements, and add then to your container. The dropdown and datagrid will require extra code to provide a dataprovider, and you will have to add the default skin by a setStyle, but that should get you going in the right direction. one cavot is that the id is not searchable you will have to search by name in the container, if you want to change the element after you add it to the container. I create elements dynamically by quering a database to create the elements needed in a flex applicaton, the structure and flow of forms are all in the database and I use flex to create the components on the fly... Randy --- In flexcoders@yahoogroups.com, Angelo Anolin wrote: > > Hi FlexCoders, > > I came across a Flex PM site and I would like to ask what are the necessary > controls / things I need to do to achieve the same application. > > The site's page is: > > http://www.radscientist.com/flexpm/demo/index.html > > I am having problems re-creating those items which expands when the plus sign > is > clicked as well as adding new items when the Add Milestone button is clicked. > How do I achieve adding controls on the fly on the application? > > I hope you could provide some guidance on this. > > Thanks. > > Angelo >
Re: [flexcoders] Re: Flex Project Management App
Care to share some of the codes you used for the custom component? I will explore further the site you mentioned. Thanks. From: Johannes Nel To: flexcoders@yahoogroups.com Sent: Fri, 9 July, 2010 9:36:00 Subject: Re: [flexcoders] Re: Flex Project Management App i would guess the person used a tree with custom itemrederer or a custom component for http://www.seenowdo .com we use a custom component for the taskboard On Fri, Jul 9, 2010 at 3:59 PM, valdhor wrote: >I would create a custom component that has all of the features of the >milestone >encapsulated. ie. The plus button, the label, the datagrid, the add and remove >tasks buttons etc. > >I would also have a custom component comprising of the datagrid and its sub >components. > >All you would need to do when someone clicks the add milestone button is to >create a new instance of the custom component and add it to the display list. > > >--- In flexcod...@yahoogro ups.com, Angelo Anolin wrote: >> >> Hi FlexCoders, >> >> I came across a Flex PM site and I would like to ask what are the necessary >> controls / things I need to do to achieve the same application. >> >> The site's page is: >> >> http://www.radscien tist.com/ flexpm/demo/ index.html >> >> I am having problems re-creating those items which expands when the plus >> sign >>is >> >> clicked as well as adding new items when the Add Milestone button is >> clicked. >> How do I achieve adding controls on the fly on the application? >> >> I hope you could provide some guidance on this. >> >> Thanks. >> >> Angelo >> > > -- j:pn \\no comment
Re: [flexcoders] Re: Flex Project Management App
i would guess the person used a tree with custom itemrederer or a custom component for http://www.seenowdo.com we use a custom component for the taskboard On Fri, Jul 9, 2010 at 3:59 PM, valdhor wrote: > > > I would create a custom component that has all of the features of the > milestone encapsulated. ie. The plus button, the label, the datagrid, the > add and remove tasks buttons etc. > > I would also have a custom component comprising of the datagrid and its sub > components. > > All you would need to do when someone clicks the add milestone button is to > create a new instance of the custom component and add it to the display > list. > > > --- In flexcoders@yahoogroups.com , Angelo > Anolin wrote: > > > > Hi FlexCoders, > > > > I came across a Flex PM site and I would like to ask what are the > necessary > > controls / things I need to do to achieve the same application. > > > > The site's page is: > > > > http://www.radscientist.com/flexpm/demo/index.html > > > > I am having problems re-creating those items which expands when the plus > sign is > > clicked as well as adding new items when the Add Milestone button is > clicked. > > How do I achieve adding controls on the fly on the application? > > > > I hope you could provide some guidance on this. > > > > Thanks. > > > > Angelo > > > > > -- j:pn \\no comment
[flexcoders] Re: Flex Project Management App
I would create a custom component that has all of the features of the milestone encapsulated. ie. The plus button, the label, the datagrid, the add and remove tasks buttons etc. I would also have a custom component comprising of the datagrid and its sub components. All you would need to do when someone clicks the add milestone button is to create a new instance of the custom component and add it to the display list. --- In flexcoders@yahoogroups.com, Angelo Anolin wrote: > > Hi FlexCoders, > > I came across a Flex PM site and I would like to ask what are the necessary > controls / things I need to do to achieve the same application. > > The site's page is: > > http://www.radscientist.com/flexpm/demo/index.html > > I am having problems re-creating those items which expands when the plus sign > is > clicked as well as adding new items when the Add Milestone button is clicked. > How do I achieve adding controls on the fly on the application? > > I hope you could provide some guidance on this. > > Thanks. > > Angelo >