LinkButton for changing the state : LinkButton « Components « Flex

Home
Flex
1.Chart
2.Components
3.Container
4.Data Model
5.Development
6.Effects
7.Event
8.Graphics
9.Grid
10.Style
Flex » Components » LinkButtonScreenshots 
LinkButton for changing the state
LinkButton for changing the state
       

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
  <mx:states>
    <mx:State name="register">
      <mx:AddChild relativeTo="{form1}" position="lastChild">
        <mx:FormItem label="Enter password again:">
          <mx:TextInput id="passwordInput2"/>
        </mx:FormItem>
      </mx:AddChild>
      <mx:SetProperty target="{stateButton}" name="label" value="Return to login"/>
      <mx:SetEventHandler target="{stateButton}" name="click" handler="currentState=''"/>
      <mx:SetProperty target="{panel1}" name="title" value="Registration Form"/>
    </mx:State>
  </mx:states>
  <mx:Panel title="Log In Form" id="panel1">
    <mx:Form id="form1">
      <mx:FormItem label="User Name:">
        <mx:TextInput id="userNameInput"/>
      </mx:FormItem>
      <mx:FormItem label="Password:">
        <mx:TextInput id="passwordInput"/>
      </mx:FormItem>
    </mx:Form>
    <mx:ControlBar id="controlbar1">
      <mx:Button label="Log In"/>
      <mx:Spacer width="100%"/>
      <mx:LinkButton label="Register as new user" id="stateButton" click="currentState='register'" />
    </mx:ControlBar>
  </mx:Panel>
</mx:Application>

   
    
    
    
    
    
    
  
Related examples in the same category
1.Add space between LinkButton and ButtonAdd space between LinkButton and Button
2.Handle click event for LinkButton through click event from its containerHandle click event for LinkButton through click event from its container
3.Define a LinkButton with Define a LinkButton with <mx:LinkButton>
4.Use LinkButton to open a URL in a web browser windowUse LinkButton to open a URL in a web browser window
5.Use LinkButton in a ViewStack navigator containerUse LinkButton in a ViewStack navigator container
6.Navigate to a URL with LinkButtonNavigate to a URL with LinkButton
7.Change state in LinkButton click event handlerChange state in LinkButton click event handler
8.LinkButton click handlerLinkButton click handler
9.Set label for LinkButtonSet label for LinkButton
10.A single LinkButton control that opens a URL in a web browser windowA single LinkButton control that opens a URL in a web browser window
11.LinkButton controls for navigating in a ViewStack navigator containerLinkButton controls for navigating in a ViewStack navigator container
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.