'set HTMLText' question

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
glenn9
Posts: 220
Joined: Wed Jan 15, 2020 10:45 pm
Location: Europe

'set HTMLText' question

Post by glenn9 » Thu Feb 24, 2022 2:25 pm

Hi everyone,

I'm wanting to 'put' text from an array 'after' the text of field "B" based on this code

Code: Select all

...
put vText[vLookUp] after field"B"
...
As vText has got some styling to it, to preserve that styling I'm using

Code: Select all

set the htmlText of vText[vLookUp] to...
but as soon as I do this the existing text of field B is replaced by the text of the array item instead of being placed 'After' the text already present in field"B".

It seems that 'setting' the HTMLText seems to override whatever was originally in field"B"?

I guess I'm not understanding the HTMLText property fully?

Grateful for any help!

Thanks,

Glenn

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9286
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: 'set HTMLText' question

Post by richmond62 » Thu Feb 24, 2022 2:35 pm

Um . . .

How about this?:

Code: Select all

put the htmlText of vText[vLookUp] after fld "B"
Last edited by richmond62 on Thu Feb 24, 2022 3:41 pm, edited 1 time in total.

glenn9
Posts: 220
Joined: Wed Jan 15, 2020 10:45 pm
Location: Europe

Re: 'set HTMLText' question

Post by glenn9 » Thu Feb 24, 2022 2:52 pm

not sure why I was so 'set' on using 'set...'

...it didn't occur to me to use 'put'...

Its worked a treat... I'm glad my blushes can't be seen!

Thank you!

Glenn

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”