Re: Row-Column addressable Text Locations in TextView and TextBuffer



Bill Sousan wrote:

Is there a way to use TextView and TextBuffer to setup an addressable area
of text?  In other words, I want to have a Text Window where I can specify
to display a given string at a specific Row and Column.  I want to avoid the
overhead of having a Fixed container and popping up Labels all over the
place.  I also want to avoid having to shadow the entire text area in a
buffer and having to redisplay it each time.  I have looked at the Docs on
TextView and TextBuffer and could not find anything that may allow me to do
this.
I'm not 100% sure I'm understanding what you want, but here's my take on this...

The TextView and TextBuffer work together. The TextBuffer, if I take your meaning, 'shadows' what the TextView displays. You can't use one without the other, so if you want to use a TextView to display anything, you'll have to have a TextBuffer as well.

In theory, if you want to, you can clear the TextBuffer before dumping something else into it and give the appearance of not 'shadowing' the text. But...

If you aren't allowing the user to edit the text, you might consider using a Layout and a Label. The Label can be placed exactly where you want within the Layout, thus giving the appearance of rows and columns. You can also have multiple Labels at the same time.

If you also use a Style with the Layout, you can set the background to a colour or an image and make it look like a TextView or anything else you want.

And if you what the text to be clickable for any reason, you can wrap the Label in an EventBox.

I hope this helps, Bill.

-Ron T.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]