Bjorn,
 
have a look at the titleStyleName style property for panels.
 
Mike.

  _____  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Bjorn Schultheiss
Sent: Friday, 17 November 2006 11:01 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] CSS Font Hell <:(




Hi,

Is it possible to apply an embedded font to a Panel's title via CSS?

Here's the simplest example I could create

[Main (PanelTitleFontCSS.mxml)]
<mx:Application xmlns:mx="http://www.adobe. <http://www.adobe.com/2006/mxml>
com/2006/mxml" layout="absolute"
xmlns:my="*">
<my:MyPanel />
</mx:Application>

[Panel (MyPanel.mxml)]
<mx:Panel xmlns:mx="http://www.adobe. <http://www.adobe.com/2006/mxml>
com/2006/mxml" layout="absolute"
title="Panel Title" styleName="myFontStyle">
<mx:Style source="MyStyle.css" />
<mx:Label text="Some text" />
</mx:Panel>

[CSS (MyStyle.css)]
@font-face
{
fontFamily: myMyriadProBlack;
fontWeight: heavy;
src:url("MYRIADPB.TTF");
}
.myFontStyle
{
fontFamily: myMyriadProBlack;
fontWeight: heavy;
fontSize: 26; 
}

In this example the label within the panel has the font applied.
The Panel header is TimesRoman or something :(

Regards,

Bjorn Schultheiss
Senior Flash Developer

QDC
Personalised Communication Power

Level 2, 31 Coventry St.
South Melbourne
3205, VIC Australia

T: +61 3 9674 7400
F: +61 3 9645 9160
W: http://www.qdc. <http://www.qdc.net.au> net.au

((------------This transmission is confidential and intended solely for the
person or organization to whom it is addressed. It may contain privileged
and confidential information. If you are not the intended recipient, you
should not copy, distribute or take any action in reliance on it. If you
believe you received this transmission in error, please notify the
sender.---------------))

 

Reply via email to