AutoHotkey Community

It is currently May 27th, 2012, 7:15 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: March 26th, 2006, 9:19 pm 
Offline
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8776
Quote:
How to Display Shadowed Text in a GUI ?
http://www.autohotkey.com/forum/viewtopic.php?p=54227#54227

Two Similar Texts (with transparent background) can be overlapped (superimposed)
one over the another (with a slight offset) to create an effect of shadowed text.
These texts have to be colored in contrast with each other.

    The following example code displays a "Shadowed Text" in a GUI
    Code:
    Text= Shadowed
    Gui, -Caption
    Gui, Color, 5E43FF
    Gui,Font, s36 Bold, Verdana
    Gui, Add,Text,x4 y4 w384 h80 Center vText1 c000000 BackgroundTrans, % Text
    Gui, Add,Text,x0 y0 w384 h80 Center vText2 cFFFFFF BackgroundTrans, % Text
    Gui,Show,w400 h80
    Return

    GuiClose:
    GuiEscape:
    ExitApp
    Return


    The result of the above code:
    Image

    Seen in the above snapshot - The White colored text is vertically and
    horizontally offset from the Black colored text by 4 pixels.
    This might be a good technique for large sized texts only.
    I use this technique when scripting an Installer with AHK.

    Compare these 2 snapshots taken from a working demo.

    Image

    Image
Want to try the Demo? You may download it : ST_Demo.ahk or View the code : ST_Demo.ahk.txt

How to Display OSD with Shadowed Text : Example code is here


_________________
URLGet - Internet Explorer based Downloader
StartEx - Portable Shortcut Link


Last edited by SKAN on June 16th, 2008, 7:23 am, edited 4 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject: Shadowed Text
PostPosted: March 26th, 2006, 9:59 pm 
Offline

Joined: July 6th, 2004, 10:07 am
Posts: 171
Location: Manchester, England.
Nice. Simple but effective. :wink:

_________________
Simple ideas lie within reach, only of complex minds


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: Shadowed Text
PostPosted: March 28th, 2006, 9:51 pm 
Offline
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8776
Dippy46 wrote:
Nice. Simple but effective. :wink:


Dear Dave Perrée,

I had sent you a PM (just a thank note!), but I see you have not read it.

Thanks for the compliment! Regards, :)


Last edited by SKAN on June 16th, 2008, 7:24 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 31st, 2006, 7:07 pm 
Offline

Joined: July 6th, 2004, 10:07 am
Posts: 171
Location: Manchester, England.
Hi Goyyah,
sorry about that, been v.busy. As the other posts say
"Keep 'em coming": excellent work ! :D

Regards Dave

_________________
Simple ideas lie within reach, only of complex minds


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group