Is it possible to set just one word of a text to bold ?
William de Smet
wdesmet at wanadoo.nl
Mon Sep 11 14:53:44 EDT 2006
Hi there,
Thanks to JB and Ken it works but I want to go a little further.
Now I have 3 fields in which the user puts text and they all need to
be combined into one field (all three with htmlText).
The code used to work (without htmlText) and each line was pasted
after the last line.
Now it doesn't work anymore. And even the spaces between he separate
fields are gone. What am I doing wrong?
The code so far:
on mouseUp
put "" &cr into tData
if fld "doel" = empty
then beep
then answer error "Er is geen doel gekozen!"
then exit mouseup
else put "<b>Doel</b>" &cr & the htmltext of fld "doel" &cr&cr after tData
if fld "materialen" = empty
then beep
then answer error "Er zijn geen materialen ingevuld!"
then exit mouseup
else put "<b>Materialen</b>" &cr & the htmltext of fld "materialen"
&cr&cr after tData
if fld "evaluatie" = empty
then beep
then answer error "Er is geen evaluatie ingevuld!"
then exit mouseup
else put "<b>Evaluatie</b>" &cr & the htmltext of fld "evaluatie"
&cr&cr after tData
if fld "doel" & fld "materialen" & fld "evaluatie" is not empty then
put "__________" &cr &cr after tData
else put "__________" &cr &cr after tData
put tData after the last line of fld "pva" of card "Plan van aanpak"
set the htmlText of fld "pva" of card "Plan van aanpak" to tData
beep
answer "De tekst is gekopieerd!"
end mouseUp
Thanks again,
William de Smet
2006/9/10, Ken Ray <kray at sonsothunder.com>:
> On 9/10/06 3:20 PM, "jbv" <jbv.silences at club-internet.fr> wrote:
>
> >
> >
> > William,
> >
> > Here's a suggestion that is worth trying :
> >
> > get wordoffset("Taal",tData)
> > put "<B>Taal</B>" into word it of tData
> > set the htmlText of fld 1 to tData
>
> An alternative (without HTML) is :
>
> get wordoffset("Taal",tData)
> set the textStyle of word it to bold
>
> >> The next action is that the user copies the entire text (with the bold
> >> word "Taal") into another field. I guess it will lose the bold word
> >> "Taal" then. This needs to work too!
>
> No, you can say:
>
> set the htmlText of fld 2 to the htmlText of fld 1
>
> This will carry over an exact copy of fld 2 into fld 1
>
> HTH,
>
> Ken Ray
> Sons of Thunder Software
> Web site: http://www.sonsothunder.com/
> Email: kray at sonsothunder.com
>
> _______________________________________________
> 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
>
>
--
ICT-coördinator
Herman Broerenschool
2612 SP Delft
015-2141066
http://www.hermanbroerenschool-delft.nl
More information about the use-livecode
mailing list