 |
John Level: Trainee
 Registered: 27-11-2008 Posts: 3
|
Text Box Limitations
Hi.
I am new to any sort of programming but am experminting on vb.6 I am creating a coin collection program which I have a "show all" button. The problem is there seems to be a limitation on the textbox I am bringing the results into. My question: Is there a way to create a view box with the text file, I have created already with the 10 fields. It is a comma delim file and each field has quotes ie: "test1","test2","ect.... Are there any SIMPLE examples with using the DEFAULT names given in vb to view this data? I hope I did not confuse everyone reading this a I am very confused.
Hope someone can help.
John
|
|
|
27-11-2008 at 04:29 PM |
|
|
John Level: Trainee
 Registered: 27-11-2008 Posts: 3
|
Re: Text Box Limitations
I have a file with say about 700 records and when I list all in my textbox, it only shows roughly showes 300 and does not show the rest (and it truncates the last record in the middle). I have the multiline set to true. I'll try the listbox/list view and see what happens. Thank for the reply-
John
|
|
01-12-2008 at 02:31 PM |
|
|
John Level: Trainee
 Registered: 27-11-2008 Posts: 3
|
Re: Text Box Limitations
I'll give it a try. Is there a way to add the context of a file in the listbox on load - like... c:\test\data.dat with 10 fields in the record? .... just tried it but data did not show in listbox. What am I doing wrong?
|
|
02-12-2008 at 01:19 AM |
|
|
admin Level: Administrator

 Registered: 04-04-2002 Posts: 637
|
Re: Text Box Limitations
try this code if it helps,
create a new project with a form, add reference to Microsoft Windows Common Controls 6 and add a listview to your form, then add this code, then try to load your records inside the listview
Option Explicit
Private Sub Form_Load()
Dim i As Integer
Dim mItem As ListItem
For i = 1 To 10
ListView1.ColumnHeaders.Add , , "Column " & i
Next
ListView1.View = lvwReport
'load data inside list
'repeat this code for every record of your file to
'fill the ten fields of the row
Set mItem = ListView1.ListItems.Add(, , "data 1")
For i = 2 To 10
mItem.SubItems(i - 1) = "data " & i
Next
'--------------------------
End Sub
Private Sub Form_Resize()
ListView1.Move 0, 0, ScaleWidth, ScaleHeight
End Sub
|
____________________________
AndreaVB
|
|
02-12-2008 at 04:58 PM |
|
|
|
|
 |
 |