Показать сообщение отдельно
Старый 08.04.2011, 16:34
ommm вне форума Посмотреть профиль Отправить личное сообщение для ommm Найти все сообщения от ommm
  № 1  
Ответить с цитированием
ommm

Регистрация: Aug 2010
Сообщений: 44
По умолчанию Пропадает background на state при VerticalLayout

Объясните как правильно применять background на Application (в спарке вообще непонятно что куда)
Вопрос вот в чём - при включении VerticalLayout кудато пропадает заливка фона у state "Main" ... куда ?

Код:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
			   xmlns:s="library://ns.adobe.com/flex/spark"
			   xmlns:mx="library://ns.adobe.com/flex/mx"
			   minWidth="955" minHeight="600" currentState="Auth" creationComplete="init();">
	<fx:Declarations>
		<!-- Разместить невизуальные элементы (например, службы или объекты значений) -->
	</fx:Declarations>
	<fx:Script>
		<![CDATA[
			protected function init():void
			{
				
			}
			protected function authRequest():void
			{
				currentState="Main";
			}
		]]>
	</fx:Script>
	
	<s:states>
		<s:State name="Auth"/>
		<s:State name="LoadModule"/>
		<s:State name="Main"/>
	</s:states>
	
	<s:controlBarContent.Main>
		<s:Button label="Мордуль 1"/>
		<s:Button label="Мордуль 2"/>
		<s:Button label="Мордуль 3"/>
		<mx:ToggleButtonBar/>
	</s:controlBarContent.Main>
	
	<s:layout.Main>
		<s:VerticalLayout gap="3"/>
	</s:layout.Main>
	
	<s:Rect left="1" right="1" top="1" bottom="1">
		<s:fill>
			<s:LinearGradient rotation="90">
				<s:GradientEntry color="0xFFFFFF" />
				<s:GradientEntry color="0xE1E1E1" />
			</s:LinearGradient>
		</s:fill>
	</s:Rect>
	
	<!--Панель Авторизации-->
	<s:Panel includeIn="Auth" title="Авторизация" horizontalCenter="0" verticalCenter="0" cornerRadius="2" dropShadowVisible="false">
		<s:layout>
			<s:VerticalLayout paddingLeft="10" paddingTop="10" paddingRight="10" paddingBottom="10" gap="5"/>
		</s:layout>
		<s:Label id="LoginLabel" width="100%" text="Для входа в систему введите:" fontWeight="bold" textAlign="center"/>
		<s:HGroup width="100%" verticalAlign="middle" horizontalAlign="right">
			<s:Label text="Логин:"/>
			<s:TextInput id="LoginField" width="220" text=""/>
		</s:HGroup>
		<s:HGroup width="100%" verticalAlign="middle" horizontalAlign="right">
			<s:Label text="Пароль:"/>
			<s:TextInput id="PasswordField" width="220" text="" displayAsPassword="true"/>
		</s:HGroup>
		<s:controlBarContent>
			<mx:Spacer width="100%"/>
			<s:Button id="authBtn" label="Вход" click="authRequest();"/>
		</s:controlBarContent>
	</s:Panel>
	
	<!--Главное окно-->
	<s:Group includeIn="Main" width="100%" height="100%">
	</s:Group>
</s:Application>
буду рад любому совету


Последний раз редактировалось ommm; 08.04.2011 в 16:36.