alter textstyle 'on the fly'

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

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9647
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: alter textstyle 'on the fly'

Post by dunbarx » Tue Mar 08, 2022 8:41 pm

@Jean-marc.

Well, anything to make it stand out, but I think that, since the OP wants to identify only single characters, something MUCH more bold is required.

@Glenn. Are you OK with locating all these single characters peppered randomly within a body of text? Perhaps you can set up the word that the special character is appended instead of just itself? At least that would be easier to notice

How about this? You might set the textStyle of that word to "box". I find that simple to see.

Craig

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

Re: alter textstyle 'on the fly'

Post by glenn9 » Tue Mar 08, 2022 11:41 pm

Thank you both for your suggestions, it has certainly made me think.

For my use case the single character is ideal for me, especially the opening parenthesis as I often need to add some qualifying text to items that have been raised by the person I'm speaking with. The "(" therefore acts as a prompt for me to add more detail.

As you suggested earlier on Craig, I like the idea of increasing the text size or making it bold to stand out better and thank you Jean-Marc for giving me the understanding of how to achieve this now. (I'm not sure I understand the concept of 'metadata' though)

Regards,

Glenn

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

Re: alter textstyle 'on the fly'

Post by glenn9 » Tue Mar 08, 2022 11:45 pm

Aha, I didn't realise 'metadata' is a property, I've just checked it out in the dictionary.. very interesting, yes, I might be able to develop this further in in my 'scribe' role...

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: alter textstyle 'on the fly'

Post by jmburnod » Thu Mar 10, 2022 3:03 pm

Hi,
I played around Glenn stuff
I made a small stack to test use of metadata for scribe activities. There is two modes
Edition mode (locktext = false)
When you type a "(" a list of keywords appear. A click on one of them set the metadata of current word to clicked keyword

Using mode (locktext = true)
Words with metadata have textstyle = link
A click on one display metadata on a small field
ScribeUsingMetadata.zip
(2.08 KiB) Downloaded 63 times
Best
Jean-Marc
https://alternatic.ch

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

Re: alter textstyle 'on the fly'

Post by glenn9 » Thu Mar 10, 2022 9:33 pm

Hi Jean-Marc,

many thanks for the example stack - I can now see how metadata can work and be used.

Kind regards,

Glenn

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”