Blitz (365/640)

From:Curt Esser
Date:10 Sep 99 at 11:44:07
Subject:Re: GTText gadgets

Hi Matt

First of all, does anybody know how to make YAM display the character "#"
all the time, rather than changing the text colours?

Anyway, if you are using YAM, please save this letter as Plain text first
and read it with a text reader, or the code below will not be shown
correctly...

Does this happen with other email programs too?

On 09-Sep-99, Matt Briggs wrote:
> HiYa all
>
> I am using a GTText gadget to display some text in a
> window, and I am using flag $10 to centre the text, like
> so:-
>
>> GTText 0,1,x,y,w,h,"CENTER!!!",$10,""

You are confusing the Flags with the Tags...

The $10 simply tells GadTools to put the gadget's title inside the gadget -
not what you'd want to do with a text gadget, since it would be
over-written as soon as you send some text to it.

The Display$ parameter is actually the default "contents" of the text gadget
- the Text$ parameter is the title of the gadget...

Anyway, to center the text display, try this:

You need Amigalibs.res in the compiler options

GTTags #GTNM_Clipped,-1,#GTTX_Justification,#GTJ_CENTER
GTText 0,1,x,y,w,h,"Output",$8,"Testing"

The above code will create a text gadget with the title "Output" below the
gadget, and the word "Testing" centered inside. The GTTags line must come
directly before the line that creates the gadget, and the tags are only
used for the one gadget, so if you are creating more than one, you must
duplicate it every time.

Any text sent to this gadget will be centered in it.

If you don't want a title for the gadget, change "Output" to "" and the flag
to 0

You can also use #GTJ_RIGHT if you want the output aligned to the right side
for some reason.

Later...



Yours electronically,
Curt Esser
camge@ix.netcom.com
http://members.xoom.com/Curt_Esser/

---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list-help@netsoc.ucd.ie