` Comment on an Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Add a comment to an Icetips Article

Please add your comments to this article. Please note that you must provide both a name and a valid email address in order for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!

Your Name:  
Email:  
Header text/Subject:  

Please enter your comment in the box below:

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Par2: Displaying more than 64k in a Text control
2013-08-10 -- Graham Dawson
 
You can use the DOS file driver and slice the text in the control using prop:text eg dosFile file,driver('DOS') record record line string(65565) end end LoadText routine dosFile{prop:name} = 'fullpathOfYourFile' open(dosFile) set(dosFile) loop next(dosFile) if errorcode() then break end if not bytes(dosFile) then break end ?Text1{prop:text} = ?Text1{prop:text} & | dosFile.line[1 : bytes(dosFile)] end close(dosFile) Obviously above needs error checking - but just tested with a 109KB CLW source file, an ordinary TEXT control (_not_ RTF) with horizontal and vertical scrollbars and everything loads OK. So the text control itself doesn't have a 64KB limit.


Today is May 3, 2024, 4:30 pm
This article has been viewed 35122 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: