Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Maximum Characters in a Listbox?

Posted on 1998-12-17
8
Medium Priority
?
461 Views
Last Modified: 2013-12-03
Can someone tell me if there is a maximum numbers of characters that a line in a list can display - and what the max is?
0
Comment
Question by:spatel121798
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
8 Comments
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1450925
It's 64K in C++. In VB I don't know. But what is your problem?
 1000 or so characters work without any problem. More becomes useless.
0
 
LVL 2

Accepted Solution

by:
cartti earned 200 total points
ID: 1450926
The maximum number of characters per line for a listbox is 1024.

If you try to add a string greater than that length to a listbox, it will only hold the first 1024 characters.
0
 

Author Comment

by:spatel121798
ID: 1450927
I have designed a utility in VB which reads a text file into a list and strips off certain words from each line etc. I am reading the file into a list - but one sentence can be 2kb - and ive noticed that it gets truncated - because you said it can only hold 1kb. Is there a way round this?

And are there other ways of reading in files that can do specific searches per sentence?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:spatel121798
ID: 1450928
Please can someone help me.
0
 
LVL 2

Expert Comment

by:cartti
ID: 1450929
I'll have a think about first point.

With searches, are you talking about searching a word within a sentence, or a sentence within a file ?
0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1450930
Why not split the line every 1000 characters
0
 

Author Comment

by:spatel121798
ID: 1450931
here is an example of one of my sentences:

<Message:<GroupId:123456><Id:1><Num:11375><Date:17-Apr-1997><Time:14:39:38><Expiry:90><TranStartNum:11239><Collection:TrainingMessage><ObjectName:A_EPOSSProducts1_3011><DateChangeList:<Date:<DateName:StartDate><Type:1>>><Data:<Collection:_EPOSSProducts><ObjectName:3011_00><StartDate:16-June1997> <EndDate:><RData:<Data:<PN:3011><SN:Blu Wat><LN:Blue Sea Water><RN:Blue SeaWater><FP:False><RP:><MV:1.00><SE:In><AS:False><MnV:1.00><MxV:45.00><MnQ:1><MxQ:1><RcptNo:2><SR:True><MP:0><V:0><RV:True><RT:7><RA:APS><SI:TrainingAPScardscheme><IA:><PM:<L1:><L2:3026><L3:3006><L4:3013><L5:3017>><SM:><I:False><ST:><DEP:E><AdditionalData:<F:*><S:Numeric><D:><Max:6><Min:0><VM:><N:APSSEQ><C:><O:0><A:None><SD:>><AdditionalData:<P:TokenType:><F:*><S:Alphanumeric><D:><Max:10><Min:0><VM:><N:TT><C:><O:0><A:Display><SD:<Option:<Text:MagCard><Key:1>><Option:<Text:BarCode><Key:2>>>><AdditionalData:<F:*><S:Date><D:><Max:8><Min:0><VM:><N:AD><C:><O:0><A:None><SD:>><AdditionalData:<F:*><S:Numeric><D:><Max:6><Min:0><VM:><N:CA><C:><O:0><<AdditionalData:<P:Method of Payment:><F:*><S:Options><D:><Max:6><Min:0><VM:><N:MoP><C:MethodPayment><O:99><A:Display><SD:<Option:<Text:Cash><Key:0>><Option:<Text:Cheque><Key:1>>>><AdditionalData:<F:*><S:Alphanumeric><D:><Max:4><Min:0><VM:><N:SVC><C:><O:0><A:None><SD:>><AdditionalData:<F:*><S:Numeric><D:><Max:40><Min:0><VM:><N:CuR><C:><O:0><A:None><SD:>><AdditionalData:<F:*><S:Alphanumeric><D:><Max:4><Min:0><VM:><N:CID><C:><O:0><A:None><SD:>><AdditionalData:<F:*><S:Alphanumeric><D:><Max:2><Min:0><VM:><N:SG><C:><O:0><A:None><SD:>><AdditionalData:<F:*><S:Alphanumeric><Max:10><Min:1><N:TI><O:0><A:None>><AdditionalData:<F:*><S:Alphanumeric><Max:24><Min:1><N:TD><O:0><A:None>><AdditionalData:<F:*><S:Alphanumeric><Max:24><Min:1><N:CN><O:0><A:None>><AdditionalData:<F:*><S:Alphanumeric><Max:10><Min:1><N:TV><O:0><A:None>>>>><Version:1><CRC:C620E1DD>>

basically in this example i am searching for the word "collection" and deleting everything before it. I am also searching for other words in the sentence and stripping off everything after it.

if i was to split the lines up - how would i go about doing it. currently the code i am using to input the file is:

Do While Not EOF(fh) ' Loop until end of file.
    Line Input #fh, textline ' Read line into variable.
    FrmDisplay!List1.AddItem textline    
Loop

Thanks for the help!

0
 

Author Comment

by:spatel121798
ID: 1450932
Also, is there a way of putting a horizontal scroll on my listbox so that i can see the complete sentence?
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question