With RTF Control user must use CTRL-ENTER key to go to the next line!
is there anyway allow user to type normally?
With RTF Control user must use CTRL-ENTER key to go to the next line!
is there anyway allow user to type normally?
What version of Clarion and the RTF control are you using?
Enter key inserts a new line for me in Clarion 9.1 and Clarion 10.
latest Clarion 10
10.0.0 Build 12799
I tested with 12799 and it worked here.
You might need to post some additional details.
What does your RTF Text control definition look like? Are you using one of the RTF Control classes with it? If so, what initialization code is being done by the class.
Anything you think might be helpful.
Iāll tryā¦
Not used RichText before - (well may have tried some years ago)
I have used 255 char text fields but need more now ie. 2048
Since text field canāt do more than 255 I tried RichText
I created a Window and simply dropped RTF Control set to Field
(donāt need status bar). I disabled the new button
Canāt see anything in properties/actions regarding the control!
I have use Default ABC: RTFControlClass ticked
Two points.
First, the standard text control can definitely take more than 255 characters. I would not use RTF unless your users need to format the text in the field.
Second, you should be able to use Enter to make new lines in either a regular or RTF control.
Try the attached example. It is in C 10.12799. It works here for me. It is a very simple ABC app with one window using a text control and another using the RTF Control template.
TextControlTest.zip (10.1 KB)
ENTRY controls are limited to 255, but TEXT can go way higher. Last time I checked, they were limited to around 30K characters unless there were multiple TEXT controls on the same window, then the capacity seemed to drop.
If you actually want Rich Text, you need to give a very generous string size to handle all of the extra āstuffā in RTF.
Hi Jeff,
Iām not sure that is still true. I have a window in C9.1 with 3 RTF text controls and each of them are 200,000 characters in size.
I do have a confirmed PTSS report of a bug that doesnāt allow you to paste more characters into a text control after you have pasted around 6000 characters. However, if you close and reopen the window you can paste another 6000 characters.
http://problemtracker.softvelocity.com/UpdtAllBugsview.php?ID1=42711
Looks like youāre right Rick. Not sure when that changed, but C10 is way better.
I just created a 2MB string and pasted that much into the TEXT control.
Thanks.
THANK YOU very much for your help.
The problem was caused by ABCFree DOSEnter template!
I selected Donāt generate Code and thatās sorted the ENTER Key problem.
In my dictionary, I have Notes and Comments fields set to 2048 & CString in most used tables
maybe I had experimented with a large text field. Good to know I donāt really need to use RTF to get large text box!! Unfortunatly, havenāt had time to use Clarion for about 2 years (well apart from a few minor fixes)
Anyway, sorted now & thanks for your help
Hi Rick,
Iāve got the problem, that I can not put more than 32,768 charās into the text control. The data type in the dictionary is a BLOB, so it can hold more than this 32,768 charās. This is already the case because of the RTF format of the data. Read / write more than this amount of charās should not be the problem.
Could you please give me a hint, how to hold 200,000 charās within a RTF text control?
Thanks a lot in advance!
Best Christoph
What does the definition of your TEXT control look like and what is the definition of the USE variable?
Hi Rick,
Please find the code snippets here: https://gist.github.com/gla-chk/c61ec272a556ebec573aa1733fc5a79d
Iāve used StringTheory to read / write to a BLOB field. At database (PostgreSQL) level this is a text column.
Thanks a lot!
Christoph
The main difference is I declare a local variable and use that for the text control. It does mean you have to pick some maximum limit for your field, even though a BLOB can be any size.
loc:DefaultConditions CSTRING(200001) !
TEXT,AT(12,61,321,183),USE(loc:DefaultConditions),FONT(āArialā,10,CHARSET:ANSI),RTF(TEXT:Field), |
VSCROLL,BOXED
RTFControlConditions.Init(?loc:DefaultConditions)
The use loc:DefaultConditions to move the text back and forth to your BLOB.
Hi Rick,
thanks a lot for your feedback / help. Iāll need to figure out the suitable maximum amount of charās now.
Best regards
Christoph