blob: 0ad792d74409e6200ed916302b00b401c7ee614f [file] [log] [blame]
<?xml version='1.0' encoding='UTF-8'?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<s:Module xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<s:Panel title="Spinner Control Example" width="100%" height="100%">
<s:layout>
<s:VerticalLayout paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10"/>
</s:layout>
<s:HGroup>
<mx:Text text="Use the arrows to change tabs:"/>
<s:Spinner id="mySpinner" maximum="3"/>
</s:HGroup>
<!-- Two way binding is being used so that changes to the tab navigator remain synced with Spinner value -->
<mx:TabNavigator id="myTabNav" width="75%" height="75%" selectedIndex="@{mySpinner.value}">
<mx:HBox label="Tab 1">
<mx:Text text="Text on Tab 1 " fontSize="14" color="red"/>
</mx:HBox>
<mx:HBox label="Tab 2">
<mx:Text text="Text on Tab 2" fontSize="16"/>
</mx:HBox>
<mx:HBox label="Tab 3">
<mx:Text text="Text on Tab 3" fontSize="18" color="green"/>
</mx:HBox>
<mx:HBox label="Tab 4">
<mx:Text text="Text on Tab 4" fontSize="20" color="purple"/>
</mx:HBox>
</mx:TabNavigator>
</s:Panel>
</s:Module>