Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Tue Aug 11, 2020 10:04 pm

All times are UTC - 5 hours

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Formatted Text Control (FTC) Help - How to do Text Uppercase
PostPosted: Mon Aug 22, 2011 3:03 pm 

Joined: Sun Jan 23, 2011 11:59 am
Posts: 465
I am beginning to work with FTC as the provided TextArea could not really handle some imported RTF files. Although FTC solves many of my issues, I just could not grasp how to handle some seemingly basic functions. I guess I am just stupid, no matter how many times I go through the provided example and the help file. I did find some ways of getting some things done by experimenting around and after weeks, I could get something done.

However, there are some things I still cannot do. Firstly, I know how to determine the length of the selected text by doing a formattedtext1.getdoc.getSelectionLength but how do I go about determining the text which has been selected ?

Secondly, I do not know how to do a simple convert all text to uppercase while retaining the styles. I tried doing a formattedtext1.setrtf(uppercase(formattedtext1.getrtf)) but it mess the rtf tags which are supposed to be in lowercase. That method works with converting text to lowercase.

I contacted Brendan and he told me to look at the FTInterator class as template and to walk through the paragraphs and then for each paragraph change the case of each FTStylerun. I looked at the HTMLInterator and try to replicate it without success. I feel really stupid because I really do not understand how to do it. I was wondering if there is a simple example of how to accomplish this.


RealStudio 2012R1 ♡ Macbook Pro Mac OS X 10.8.1 Moutain Lion

Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group