Scrolling List Field

Mark Smith mark at maseurope.net
Tue Aug 15 14:11:56 EDT 2006


To do this, I think you'll have to explicitly set the textFont of the  
text you have just placed in fld "TabField". The text you have placed  
in the global variable "chord" has no font property - it is simply text.

So you might put something like this at the end of the placeChord  
handler:

put length(chord) into chordLength
set the textFont of char (0 - chordLength) to -1 of fld "tabField" of  
stack "UkeTab" to the textFont of fld "ChordList"

Best,

Mark


On 15 Aug 2006, at 18:59, John Baxter wrote:

> Thanks for the help. You guys are great. I've got most everything  
> working
> except for the font issue. I have a mainstack with a "TabField". I  
> use this
> code:
>
> on openStack
>    put empty into field "TabField"
> end openStack
>
> I have two palettes, each one uses a different font.
>
> Palette1 - buttons use this code:
>
> on mouseUp
>    put "A" after field "TabField" of stack "UkeTab"
> end mouseUp
>
> Palette2 - scrolling list and insert button. Button uses this code:
>
> on mouseUp
>    global chord
>    put value(the selectedLine of fld "ChordList") into chord
>    placechord
> end mouseUp
>
> on placechord
>    global chord
>    if chord is "A" then
>    put "A" after field "TabField" of stack "UkeTab"
> end placechord
>
>
> What I'm trying to do is mix font styles in the mainstack field  
> when I do
> the mouseUp from each Palette. I experimented with different code,  
> but can't
> get the inserted characters to display in the proper font.
>
> [set text font of "A" to "ukefont"]  -- when I click a button on  
> Palette1
> [set textfont of "A" to "ukechord"]  -- which I click Insert button on
> Palette2
>
> Thanks for any help or advise you have.
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list