2013-04-29 3 views
1
<?xml version="1.0"?> 
<!-- styles/TimeFormat.mxml --> 
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundColor="red"> 

    <mx:Style> 
    Button 
    { 
     marginLeft: 500px; 

    } 

    </mx:Style> 
    <mx:Button label="Start" /> 
</mx:Application> 

marginLeft가 작동하지 않습니다. 어떻게하면 기본적으로 다른 곳에서 버튼을 움직일 수 있습니까?플렉스 여백 버튼

답변

3

나는 스타일로 그것을 시도하고 일했다 :

enter image description here

<?xml version="1.0" encoding="utf-8"?> 
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" 
      minWidth="955" minHeight="600"> 
<mx:Style> 
    Button 
    { 
     left: 500px; 
     top: 20px; 
    } 
</mx:Style> 
<mx:Button label="Hello"/> 
</mx:Application> 
0

버튼을 이동하려면, 왼쪽 또는 X 사용하십시오 속성 :

<mx:Button label="Start" left="500" /> 
+0

스타일에서 이것을 쓸 수 있나요?하지만 왼쪽과 오른쪽은 스타일에서 작동하지 않습니다. – Hello

1
Alternate you can add <mx:Spacer width="500"/> 
관련 문제