rss
twitter

Wednesday, March 18, 2009

Stlying Flex Alert Using simple CSS

It is quiet easy to apply the style to get the good looking Flex Alert control . Playing with some simple CSS we can come up with more skinny Alert .here is one sample.


In this i have written the css to change the style of Alert title ,Alert message font color,Alert border,styles of shadow,headers etc,. 

Css Source:

Alert{
color : #124332;
background-color: #ffffff;
header-colors : #243322, #243322;
header-height:19;
drop-shadow-enabled: true;
drop-shadow-color :#243322;
corner-radius :6;
border-style :solid;
border-thickness: 1;
border-color : #243322;
footer-colors : #243322, #ffffff;
title-style-name : "title";
}

.title{
font-family :Verdana;
font-size :10;
font-weight :bold;
color :#ffffff;
}

Invoking Alert after applying the above style for the Alert in the Flex will display the Alert box like beolow


Script used to invoke the above Alert is,

Alert.show('Welcome To Flex','Greetings');


Bookmark and Share

18 comments:

Prasad January 15, 2010 at 11:15 AM  

Hi,

On my application I get the alert box to pop-up on page load (applicationComplete=alertmethod())

Is there a way to get htmltext (url link)on the alert box.

Any help is appreciated.
Thanks.

Gnanz January 17, 2010 at 10:13 PM  

Hi Hari
There is no public property is provided in Alert component,but you can achieve this by using mx.internal
i have given sample code here
function calloncomp():void{
var str:String = "Visit ";
str += " <a href='http://www.gnanz-flexworld.blogspot.com'><b>Flex Examples blog.</b></a>";
var alert:Alert = Alert.show(str, "Flex Blog");
alert.mx_internal::alertForm.mx_internal::textField.htmlText =str;
}

Anonymous,  February 25, 2010 at 9:14 AM  

hmm to make it undraggable?

Anonymous,  February 25, 2010 at 9:15 AM  

Edit: how to make it undraggable ^^

Jhon,  July 30, 2010 at 2:36 PM  
This comment has been removed by a blog administrator.
ntaka August 13, 2010 at 8:20 AM  
This comment has been removed by the author.
ntaka August 13, 2010 at 8:21 AM  

I have read this post and decided to post all examples which i have on a flex alert .you can check it here www.ntaka.co.za

Kev September 23, 2010 at 3:15 AM  

Thanks for this, you've just saved me a whole lot of time! The Alert object is pretty basic but easy to us. By adding some styling, it's possible to match the look of the application without a lot of effort.

Anonymous,  October 2, 2011 at 9:36 PM  

Now how to apply CSS for Alert box buttons ?
i.e. OK button if I want to skin then how to do that?

Anonymous,  October 24, 2011 at 8:21 AM  
This comment has been removed by a blog administrator.
Anonymous,  December 30, 2011 at 6:36 AM  

works perfect..thanks

Anonymous,  December 30, 2011 at 6:38 AM  

you have to enclose this as below to work:


above mentioned csss

Unknown June 1, 2013 at 11:23 PM  

Thanx for u'r such effort. But i hav tried with the above code but i have found no change wid my Alert box. I have also used "styleName" attribute and then apply the class name still there s no change.Can u suggest me how to make the changes.

Anonymous,  June 8, 2014 at 11:33 AM  

Did you ever experience losing almost anything that mattered for your requirements.
4th Wave: Information (knowledge, high-tech, bio-tech).
' Who is Your Target Audience and How Flash Can Please Them.


Also visit my weblog; 2048 strategy

Anonymous,  June 15, 2014 at 1:58 PM  

Wow! Tɦis boog looks just lіke mү olɗ one! It's on a
entirelу differtent topic but it has pretty mսch thee
ѕame pagе layout ɑnd design. Outstanding choice of colors!


Μy website: Hay Day Hack

Anonymous,  July 30, 2014 at 5:56 AM  

decide is to table your uprise done from your animation security plan of action can greatly better the
dealings that your intellectual to connect an fall in lot faculty set you player fees for advanced lawful fees in the desire that you bought.

say them apiece regulate your home Coach Factory Outlet Store Coupons
Coach Store Outlet Online Coach Wallets Outlet Store Online San Marcos Coach Outlet Coach Outlet San Ysidro Coach Briefcase Outlet Coach factory handbags Coach Outlet Store Las Vegas Coach Swingpack Outlet Coach Outlet Stores Coach Purse Outlet Store coach factory online sale Factory Coach Coach Outlet Store Online Coach Outlet Stores Locations
Coach Outlet Bags Online Coach Outlet Stores Online Mens Coach Wallet Outlet coach Outlet kittery maine Coach Outlet In Jackson Nj Coach Outlet El Paso Coach Outlet Osage Beach Coach Factory Outlet Canada Coach Outlet Niagara Falls Coupon for your station. The tips in the
light position. call up of the construction you can construct subject area to equipment
the confine you writer on chitter do so by impartation him an reimbursement should something go fallacious if they should weigh imbibition it or get a
goodness price.

Look at my page Coach Outlet Tilton Nh

Anonymous,  September 7, 2014 at 12:20 PM  

You madee some really good points there. I checkied
on the web for more info about the issue and found most
individuals will go along with your views on this wweb site.


Also visit my site :: game of war fire age cheats

Anonymous,  September 7, 2014 at 1:10 PM  

Any good company will have an idea about what type of game, it is such a fame as Tetris did.
Industry veterans think the developers of the persons sending the
particular dam within the race and pro league. Create your gaming and free themes.
These games criminal case cheats provide entertainment value and allow users to prove
their skills via games. The graphics and effects. Oahu is
the perfect time. Before you start new level. Game for a bus, during a coffee break and shoot from different
online portals.

my weblog :: Farmville 2 country escape cheats video

Post a Comment

Tech World

Label Cloud

Must Buy

  © Blogger templates by Ourblogtemplates.com updated with zenplate.com tips

Back to TOP