スタイルを使う
Flexアプリケーションの外観は、スタイルの設定で変更できます。
アプリケーションの背景色変更のサンプル
サンプル:
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <!-- アプリケーションの背景色を変更 backgroundImage の値を空文字にし、デフォルトの背景画像を無効化する。 backgroundColor で 背景色を指定。 --> <mx:Style> Application { backgroundImage: ""; backgroundColor: #eeeeee; } </mx:Style> <mx:Panel title="" > <mx:TextArea id="stdout" text="文字列" width="200" height="100" /> </mx:Panel> </mx:Application>
外部スタイルシートから設定を読む
スタイルは、外部スタイルシートにすることもできます。
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <!-- 外部スタイルシートを指定。 --> <mx:Style source="sample.css" /> <mx:Panel title="" > <mx:TextArea id="stdout" text="文字列" width="200" height="100" /> </mx:Panel> </mx:Application>
Application { backgroundImage: ""; backgroundColor: #eeeeee; }
参考: