LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I display more than 2500 lines of text?

I need to read in large text files, allow the User to edit them, then store the modified text back on the hard disk. I thought I could just use a "text box control", but I found the followin in the help file:

A text box can have only a limited number of lines. The number of lines multiplied by the pixel height of the font must be less than 32,767, or else the text box does not scroll. In a text box that uses NIDialogMetaFont or NIEditorMetaFont, you can have a maximum of about 2,500 lines.

My text files could be up to 256K lines. Any suggestions on how I could do this?

Thanks,
Jeff Smith
Northrop Grumman Corp.
0 Kudos
Message 1 of 3
(3,204 Views)
You could use an ActiveX text box control if you have CVI 6.0. I don't think the Microsoft Rich Text Box has that limitation. Also, you could actually use a textbox with your own scroll bar control (cvi\toolslib\custctrl\scroll.fp) And only load parts of the file from a buffer into the text box based on the position of the scroll bar.

Best Regards,

Chris Matthews
National Instruments
0 Kudos
Message 2 of 3
(3,204 Views)
Which version of CVI are you using? Because that limitation of text boxes has already been removed a couple of versions ago (version 5.5, if I'm not mistaken)

Luis Gomes
NI
0 Kudos
Message 3 of 3
(3,204 Views)