Flex :: 4 - Add A Component Into A Viewstack Dynamically

Aug 2, 2011

I want to add a component into a Viewstack dynamically in flex4. Like code below

[Code]....

But the code in comment doesn't play the effect. How can I implement it? Does the canvas have any hideffect or showeffect to Bind

View 2 Replies


Similar Posts:


Flex :: ViewStack - Adjusting Component Size To Be Same

Mar 22, 2010

I have a viewstack with 3 items in it. Now my problem is that I want all these components to be of the same size. Its simply enough to do this manually but is there any other way of setting the size for all the components at once?

View 2 Replies

Flex :: Toggle Viewstack Within Child Component?

Feb 12, 2011

I have a viewstack with two tabs.In one of them there is a data grid shows a list of notes. The other one is includes a form that can edit notes or crates new note. I want the user to be able to add new note or edit existing note when clicks an item in data grid. I mean when user clicks an item the viewstack must become editor.

View 1 Replies

Flex :: Populate A Mx:ViewStack Dynamically With A DataProvider For A Tabbed Navigation?

May 12, 2011

I'm very sleepy right now, so this is just an example of what I want (obviously this code is wrong):

<?xml version="1.0" encoding="utf-8"?>
<s:Application
xmlns:fx="http://ns.adobe.com/mxml/2009"

[code].....

View 1 Replies

Flash :: Call Viewstack (main App) From Component

Dec 14, 2011

I have a viewstack in my main application

public var currentStep:int;
<mx:ViewStack id="step" selectedIndex="{currentStep}">
<comp:Choosecar id="choosecar" />
<comp:Configcar id="configcar" />
</mx>

I'm using a drag and drop inside to choosecar component, so I want to change the 'currentstep' - which is a variable of the main application - with +1 so the viewstack changes to the second component 'configcar'. The only solution I found is calling a component from the main application, I need it the other way around but I can't find it.

View 1 Replies

Flash :: Viewstack With Components - Wait Component To Load

Dec 14, 2011

I'm having a viewstack with a few components. Those components have to execute a function with parameters coming from other components. Therefore the other component may not me loaded directly. Is there any way to load a component via AS3 with a function?

View 2 Replies

Flex :: Dynamically Add Component In Container

Mar 18, 2011

I want to dynamically add component in Container like Canvas(TileList constraints each child has the same size, GridList is poor in performance), for example

[Code]...

when I click the button, I hope add a component(whatever the component is, and maybe each component has different size), and if the total width of all added child is greater than myHolder, I hope the new child can begin in new line, and stretch the height of myHolder at the same time.(layout with custom code is better)

View 2 Replies

Flex :: Scrollbar On Dynamically Rendered Component?

Jun 4, 2011

I'm trying to display a custom component i made inside a panel but when it renders the content is displayed outside of the panel box and there's no scrollbar.a panelan instance of myComponent inside the panela button that calls a method on myComponent that adds some controls into itWhen i run the application and press the button the following is displayed:See that the controls added dynamically in myComponent get over the panel's bottom line instead of showing only the visible part of the component and a scrollbar.

View 1 Replies

Flex :: Creating A Dynamically Sized List Component

Aug 16, 2010

I need a List that resizes to exactly fit its content, unless that height exceeds its (dynamically sized) parent container. My requirements are as follows:

The component extends List, or at least acts similarly. variableRowHeight and wordWrap both equal to true. The height of the list cannot be less than minHeight (roughly 32px for scrollbar arrows). The height of the list cannot be greater than the height of the parent container .

Note that the parent container can be resized dynamically.

The height of the list should be updated as the size of both the contents and parent container changes.

Live updating would be preferable but not necessary.

There should be no scrollbars if the content height is less than the parent container height (sounds obvious, but I've had trouble with this too).

The trouble is that with variableRowHeight and wordWrap, it's very hard to know the size of the content at any given time. If the parent container's width is reduced, a line wrap may occur in the list which will change the height of the content. I know I can measure the height of the list content using measureHeightOfItems() + viewMetrics.top + viewMetrics.bottom, but when should I calculate that? What events should I listen for? And the thing I've had the most trouble with - when should I calculate it to set the size initially (i.e. just as the content has finished populating)?

View 1 Replies

Flex :: Dynamically Initializing A Child Component At Run Time?

Jun 22, 2011

In a current Flex project, i have an issue where a certain child component must be initialized and ready when the user clicks a button. the button is a mouseClick Event.

//mouseClick Event
protected function tableSearch_searchClickHandler(event:MouseEvent):void
{

[code]......

View 1 Replies

Flex4 - Dynamically Adding Scrollbar To Flex Component?

Sep 8, 2011

I have been stuck on this for far too long. I think it's simple so I must be misunderstanding something. I want these to display across the full width of my flash app. When I shrink the width of the flash player I want a scrollbar to appear. At the moment no scroll bar is appearing.

[Code]...

View 1 Replies

Flex :: How To Dynamically Change Component In Item Renderer

Jan 16, 2012

How can I dynamically change components text size in item renderer? Here is my CustomItemRenderer.mxml:

<?xml version="1.0" encoding="utf-8"?>
<s:ItemRenderer xmlns:fx="[URL]" xmlns:s="library://ns.adobe.com/flex/spark">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
[Code] .....

When a button is pressed I want to access textArea2 and change font size.

View 1 Replies

Flex - Removing Dynamically Created Component Causes Error?

Mar 21, 2012

I have problem with casting custom event currentTarget to component. When I'm trying to removeElement from its parent container i get error. What's the deal?

TypeError: Error #1034: Type Coercion failed: cannot convert mx.events::FlexEvent@8811c41 to com.modultek.pis.itemmachine.search.events.SortEvent.
private function sortSelection_removeHandler(event:SortEvent):void
{
var sortSelection:SortSelection = event.currentTarget as SortSelection;
this.removeElement(sortSelection);
}

View 2 Replies

Flex :: Print A Dynamically Created Component/chart That Is Not Being Displayed On The Screen?

Jan 24, 2011

I have a several chart components that I have created in Flex. Basically I have set up a special UI that allows the user to select which of these charts they want to print. When they press the print button each of the selected charts is created dynamically then added to a container. Then I send this container off to FlexPrintJob.

i.e.

private function prePrint():void
{
var printSelection:Box = new Box();

[Code]....

I have seen some examples on the adobe site that add the container to the application but don't include it in the layout. This looks like the way to go.

i.e.

printSelection.includeInLayout = false;
addChild(printSelection);

View 2 Replies

Flex :: Override The Column Item Renderers For The Datagrid Component Dynamically

Feb 24, 2011

I have a view component called viewBase where I defined a advanced datagrid with few item renderers for datagrid columns. Now I have a requirement where I need to use the same view viewBase component, but not required to use any item renderers.

how to override the itemrenderers which are declared in a view component?

View 1 Replies

Flex :: Dynamic - Dynamically Access All Text Inputs Within A Custom Component In 4

Jun 8, 2011

I have a custom component which contains many promptingTextInput controls. When i click a button, I want the text field of all the promptingTextInputs to become blank. (Note: I have around 60 promptingTextInputs) How do i access the controls dynamically ? I am looking for a flex equivalent of $('input[type=text]') (like in jquery).

View 1 Replies

ActionScript 3.0 :: Dynamically Add Component - Flex Did Not Reserve Space For List To Display

Jul 21, 2009

Here is part of my code in short:

[Code]....

I realized that if I do addChild, I can't really see the dynamically added component, since flex did not reserve space for my List to display. So I do parentDocument.addChild, and then it appears no problem. My question is since it's being added in the parentDocument, so it is suppose to be a component belong to parentDocument, so is that component still be able to call this handleMouseDown? From my experience, it's still able to, but which doesn't make sense to me. Can someone explain a little about why it can still work, or any better approach other than parentDocument.addChild

View 2 Replies

Flex :: Example Flex Zend AMF Sharing Web Services Between Components In ViewStack

Aug 10, 2011

I've been searching for the last couple days but can't seem to find a basic example of what I'm looking for. I'm developing a Flex 4.5 app and in it I have a viewstack of 2 components that use some of the same services. Currently the only way I can get the app to correctly use the web services is by defining 2 different web services that use the same PHP web service file. For example: I have an app, and within it I have a viewstack with tab navigation of 2 components: #1) retrieve a list of all Salary Employees, and #2) retrieve a list of all Contractors. Currently to get it working I am defining a UsersTableEmployees webservice within component #1 and a UsersTableContractors webservice within component #2, but they both point to the same PHP class, and only differ in the arugment value I pass to them. Ie, getUsers("employee") and getUsers ("contractors"). Of course this is not best practice.

Searching StackOverflow and Google gives me many results about ColdFusion and MVC (example What's the best way to share data between components in Flex?), but I'm still confused. Can anyone here point me to a basic example (even sample MVC) and source code of an app that uses Zend AMF and allows different components to call common web services?

View 1 Replies

Actionscript 3 :: Pause/play/stop A Dynamically Loaded SWF Using SWFLoader Component In Flex 4?

Mar 24, 2012

I have a situation where I am loading an SWF (using URL as source) using the SWFLoader component in Flex 4, and now I need to implement Pause/Play and Stop functionality.

View 1 Replies

Flex :: Always Resize The ViewStack?

Mar 23, 2010

I'm using a viewStack which have is property resizeToContent set to true. When I'm selecting a child higher than the viewStack, it's correctly resized, but when I'm selecting another child which is smaller, the viewStack isn't resized! What I want is that my viewStack get the height of the selectedChild each time.

though, the Adobe doc say :

If true, the ViewStack container automatically resizes to the size of its current child.

View 1 Replies

Flex :: Possible To Use DeepLinking Without A ViewStack?

Nov 2, 2010

I've got a Flex 3 project.Does deep linking only work on viewStacks? (My project doesn't have any viewStacks). I'd like to use deeplinking based on what was selected in a comboBox. I'd like the user to be able to bookmark or use the back button based on what was selected in the comboBox.The comboBox selection determines which data is pulled from the database.Is this possible? I set-up deeplinking in another project, but it had viewStacks. And all of the deep linking examples that I've seen use viewStacks.

View 1 Replies

Php :: Find Out Dynamically Created Checkbox Is Select/unselect In Data Grid Component In Flex?

Jul 1, 2009

i created dynamically checkbox on data grid how do i find out Which checkbox select/unselect and which checkbox contact is select/unselect ? Because we cant set dynamic id for each checkbox

<mx:DataGrid x="7" y="3" width="347" height="337" dataProvider="{#####}" variableRowHeight="true">
<mx:columns>

[Code]....

View 1 Replies

Flex :: Set Selected Child In Viewstack?

Dec 3, 2009

in main.mxml :

public function init():void
{
PopUpManager.createPopUp(this,login,true);
}

[Code]....

How can i selectchild of main.mxml's Viewstack from login.mxml ?

View 4 Replies

Flex :: ViewStack Not Showing Change At First

Jan 24, 2010

I have as good as finished a new project I'm working on now for a while, and I have this small problem coming up at the fine tuning.The area of concern is so I believe the ViewStack I'm using, but I'm not sure so here the details.I have several check boxes (4), and only one at all times can be selected to show off associated Radio Buttons as a Group of (6). No RBtn pre selected.With the selection of a check box I also make visible a new Radio Button Group of (4). No RBtn pre selected here either.Now if I select one of the RBtn (6 - each has a different Paper size measurement showing) then I can view through a external Xml data file details as Size, basePrice and the totalPrice which is in this case the same as the basePrice!

This totalPrice is located on the first Canvas/Label in the VStack!Selecting any of the first three (3) of the second RBtn Group (4) No RBtn pre selected either! - it will show me a Paper type description, and by selecting the fourth RBtn it will show me as well a field with the extra costs for a Canvas type, and it should select the second Canvas of the VStack with the totalPrice which is basePrice plus the extrasCost Canvas Price.Now the problem is that my second VStack Canvas/Label = totalPrice (basePrice +extraCost) is not showing up immediately! (It just shows blank canceling the basePrice out), and only if I select another of the six (6) RBtn! then it is showing the second vStack with the totalPrice (basePrice +extraCost). From here on everything works perfectly!I think that I have to mention that my RBtn Group are working in a function If / Else / If /Else configuration where both the Labels on both VStack Canvases are called up at the same time. So therefore both Labels should have data available which than should be viewed when the VStack changes?

View 1 Replies

Flex :: Programmatically Add Views To A Viewstack

Jun 10, 2010

I'm trying to figure out how to in as3 (not mxml) add views to a view stack.For example I have a view component like so[code]I've being trying to add it to a viewstack in the following way.[code]I'm aware I have to assign ID's but for now I just want to get the view in there

View 2 Replies

Flex :: Use A Viewstack With A Tree List?

Jan 31, 2011

I want to know if I can use a tree and when and item in the tree is clicked the viewstack changes to that certain item?

View 1 Replies

Flex :: GetChildren() Not Working For ViewStack?

Mar 15, 2011

My Strucutre is like this.

<mx:ViewStack>
<mx:HBox>
<mx:Form>

[code]......

View 2 Replies

Flex :: Access Other Panels In ViewStack?

Mar 28, 2011

I have a ViewStack with 2 panels:

<mx:ViewStack id="viewstack1" height="243">
<mx:Panel id="gridPanel">
<mx:DataGrid id="grid" right="10" left="10" top="10" bottom="10" width="300" height="150" itemClick="showDetails(event)">

[Code]....

I want to have the user click a grid item in the first panel and then load the data in a panel in the second panel. I can grab the value of the index for the clicked item in the itemClicked handler, but how do I access the detailsPanel to set the values based on the row info from the Grid?

View 3 Replies

Flex :: Dynamic Tabs Using ViewStack?

Sep 20, 2008

I'm having problems creating dynamic tabs here's my code:

mxml:

<s:TabBar x="1" y="1" height="32" width="100%" dataProvider="{tabHolder}" chromeColor="#EF8B01"/>
<mx:ViewStack x="2" y="34" id="tabHolder" width="100%" height="214" creationPolicy="all">
<s:NavigatorContent label="Home" width="100%" height="100%">
<mx:Image x="6" y="8" height="181" width="402"/>

[code]....

tab wasn't added, what is wrong?

View 1 Replies

Flash :: What Is Difference Viewstack And States In Flex

Jul 21, 2009

In my flex project i used one option like Link button . If i like it will be open new page contain more information and components . Which container is suitable one ? Where is used viewstack and stages ?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved