Beat wrote:

Thanks Richard &  Bj?rnke,

Richard wrote :
 >
 >You can use an anchor tag with no href and it will not show as
 >underlined, but can store arbitrary textual data in the anchor tag's
 >"name" attribute.
 >...
 >...

 >This allows you to use anchor tags to stash info for specific runs of
 >text without altering the appearance of that text.

Thanks Richard, this is really a nice way to do this.
I can use this for associating the position of the start- and end characters. The thing for me is, that, as long as I am working on the text of the fields, I need to visually see which texts have a reference. the visual help should not interfere with the textStyles of that field. That's why I went back to setting the backColor of that part of the text instead of using a TextStyle for it. But as I said, the editing becomes harder, as I don't get to see my selection (the selectionColor is probably behind the backColor). I'd like to see the backColor of the 'marked' textparts and on top the selectionColor of the parts that I have selected (best in 50% blend mode). Would that be possible?

Maybe with a graphic that follows the selection, 'floating' behind the field and setting the field's blendlevel to 15% for the time of editing? Although I am sure there is a more elegant way.

I've tried using graphics for things like that. Seems like fun at first, until you need to wrap across different lines. Then you need to handle different textHeights. Then you pull out all your hair. ;)

One of the cool things about htmlText is that it's designed as the one way to have complete fidelity for reproducing a field's contents, style runs and all.

So conceivably you could add in tags for backgroundcolor of the text runs you want visually distinct. It can take a bit of clever parsing to get it right, but check out the optional third param for the offset function in the dictionary - it's a godsend for parsing tasks like this.

To see the format of htmlText, style some text in a field how you want it and run "put the htmlText of fld 1" in the Message Box. Everything you can do with a field can be represented in htmlText, so conversely you can do anything to htmlText that you can do to a field.

Hope that helps -

--
 Richard Gaskin
 Fourth World
 Rev training and consulting: http://www.fourthworld.com
 Webzine for Rev developers: http://www.revjournal.com
 revJournal blog: http://revjournal.com/blog.irv
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to