` Displaying more than 64k in a Text control (Graham Dawson ) - Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Icetips Article

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 April 23, 2024, 6:50 am
This article has been viewed 35116 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: