|
-
Nov 19th, 2008, 08:34 AM
#1
Thread Starter
Lively Member
[RESOLVED] TextBox questions
hello guys
I have two questions about textbox component...
1 - which is the maximum length and (if possible) how we can expand it?
2 - how to disable the vertical scrollbar of a multiline textbox while we are opening text files? usefull to speed up the opening process
Thanks!
-
Nov 19th, 2008, 08:58 AM
#2
Re: TextBox questions
1. Normal Text box has a limit of 255 characters and multiline textbox has a limit of 32,000 characters
2. The scrollbar property is read only at runtime. if you want you can set it to none at designtime...
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Nov 19th, 2008, 09:12 AM
#3
Thread Starter
Lively Member
Re: [RESOLVED] TextBox questions
Thanks for the informations koolsid!
-
Nov 19th, 2008, 12:27 PM
#4
Re: [RESOLVED] TextBox questions
To speed up opening process you should give the textbox the whole file at once. This means you should build up a string to put in the textbox.
The easiest way to read a whole file at once:
Code:
Open Filename For Input As #1
Text1.Text = Input(LOF(1), #1)
Close #1
If you need to do other processing and thus can't read a file directly, do not use Text1.Text = Text1.Text & Something! This will be very slow. Use a string variable instead.
-
Nov 19th, 2008, 01:11 PM
#5
Thread Starter
Lively Member
Re: [RESOLVED] TextBox questions
 Originally Posted by Merri
To speed up opening process you should give the textbox the whole file at once. This means you should build up a string to put in the textbox.
The easiest way to read a whole file at once:
Code:
Open Filename For Input As #1
Text1.Text = Input(LOF(1), #1)
Close #1
If you need to do other processing and thus can't read a file directly, do not use Text1.Text = Text1.Text & Something! This will be very slow. Use a string variable instead.
Thanks for the tips Merri, and very nice website btw
-
Nov 28th, 2008, 04:40 AM
#6
Thread Starter
Lively Member
Re: [RESOLVED] TextBox questions
Last question...
Does anyone knows an alternative component without that 32.000 characters limitation?
I'm looking for a component which can deal with huge data
Thanks!
-
Nov 28th, 2008, 09:54 AM
#7
Re: [RESOLVED] TextBox questions
You could consider using Richtextbox instead.
-
Nov 28th, 2008, 10:04 AM
#8
Re: [RESOLVED] TextBox questions
However, at few megabytes RTB gets pretty slow and sluggish. You'd need to be able to have a component that doesn't load the entire file to memory at once, instead reads just the scroll positions and keeps track of any changes made so that it'll display things correctly. Doing only reading display is pretty easy, going for the editing business is the hard part.
UniText that I've made can also show more than 32768 characters.
-
Nov 28th, 2008, 11:49 AM
#9
Addicted Member
Re: [RESOLVED] TextBox questions
Actually the text box control can hold over 32K it just can't load it. You can do it however through the API. Check this link:
http://www.planet-source-code.com/vb...69294&lngWId=1
-
Nov 28th, 2008, 12:02 PM
#10
Thread Starter
Lively Member
Re: [RESOLVED] TextBox questions
Thanks a lot!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|