Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

List View

Status
Not open for further replies.

joaofroes

Programmer
Nov 4, 2003
8
BR
Hi,

I´d like to know what´s the maximun text lenght that can i put in a collumn of a list view.

Thank you!

Jr.
 
joaofroes,

The text is of the string type. According to VB Help, the following should apply to strings:

String Data Type


There are two kinds of strings: variable-length and fixed-length strings.

A variable-length string can contain up to approximately 2 billion (2^31) characters.


A fixed-length string can contain 1 to approximately 64K (2^16) characters.
Note A Public fixed-length string can't be used in a class module.

The codes for String characters range from 0–255. The first 128 characters (0–127) of the character set correspond to the letters and symbols on a standard U.S. keyboard. These first 128 characters are the same as those defined by the ASCII character set. The second 128 characters (128–255) represent special characters, such as letters in international alphabets, accents, currency symbols, and fractions. The type-declaration character for String is the dollar sign ($).

You may try these limits to see if this is correct or not

vladk
 
vladk,

I´m not having problem with the string, the problem is the control. When a pass the parameter Texto(string) to control and this parameter have so much character, the list view don´t show all the characters of the string.

Call lstMemoria.ListItems.Add(, , Texto, 1)

Thank you.
 
joaofroes,

I tried this as an example:

lstMemoria.ListItems.Add 1, , String(90000000, "0")

It puts 90,000,000 characters "0" into the first item and displays as many of them as my form allows.

At the immediate window, I checked the length of this item's text; it was 90,000,000.

How many characters your textto parameter consumes?

vladk
 
Vladk,

I´d like to write a statement with 1000 characters.

Thank you, very much! You are saving me...
 
joaofroes,

I am not sure if you need more assistance or you are done.

vladk
 
Vladk,

I´m still not able to write a statement with 1000 characters in a line.

Thank you, one more time.
 
are you wanting it to wrap automatically? Could you please be more specific and maybe post some more of your code.

Thanks
 
joaofroes,

May you need to know how to break a line in IDE?

This is the example:

Private Sub Command1_Click()
Dim a

a = "AAAAAA" & _
"BBBBBB"

MsgBox a
End Sub
 
vlad and bjd4jc,

Thank you very much, i´ve just solved the problem.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top