|
-
May 29th, 2007, 06:57 AM
#1
Thread Starter
New Member
Populating large data in a single Column of Vb6 ListView Control
I have created a project (standard exe) using VB6, where a Listview has been added to a form [Microsoft Windows Common
Controls 6.0 (SP6)]. This listView is configured to have 3 Columns which are populated on "Form_Load" event. Source Code is
as below --
Private Sub Form_Load()
With ListView1
Set Item = .ListItems.Add(, , "Item 1")
Item.SubItems(1) = "ABC QWORTHRT SDHT (400S 844S 466S_GG_CC 444HST_F1_YC 423HFS_T3 462HDF_ESF_RR 445SDF_ASD 345RTY_T3_ERT 345SGF_T3_2TY 342STT_RTY_2UY 543ATY 555YTR_YY 654FDS_4433 432HFD_2344_T6 432FDS_S3_REW 543RFV_EDC 333S_2GF 321EEE_E3_3EE 322TGB_BGT_4TG 456Y_DFGH 234T 234T_F5 654HGT_5433_GF 345FRE_5643 554GFV_3423_D5 453FDW_3455 543FDS_3344 432EW2_3344_R5)"
End With
End Sub
The problem is that, on executing the application the listview column is not able to accomodate the complete text, i.e. a
part of the data is truncated in the 2nd column. The max characters from the above, that it is able to accomodete is 301
only.
Could anyone please, help me as to how to make the List view accomodate large data in a single column, without truncating the
text.
I would be highly obliged with your help.
-
May 29th, 2007, 12:43 PM
#2
Re: Populating large data in a single Column of Vb6 ListView Control
You aren't going to get a line that long in a listview column. I'm not even sure you could make the form the listview is on long enough to accommdate that string.
What does the codes between parenthese represent? Perhaps you could load just the first part (ABC QWORTHRT SDHT ) and it you wanted to see the rest, you could click on it and display that long string in a multi-line textbox.
-
May 29th, 2007, 01:41 PM
#3
Lively Member
Re: Populating large data in a single Column of Vb6 ListView Control
FTW? You want the super long text to fit in a single listview column?
And why would you do that?
Use ToolTextTip if you want.
-
May 29th, 2007, 01:43 PM
#4
Re: Populating large data in a single Column of Vb6 ListView Control
I thing even the tooltip text would be unreadable as it would not stay visible long enough to read the entire string.
-
May 29th, 2007, 01:47 PM
#5
Lively Member
Re: Populating large data in a single Column of Vb6 ListView Control
If so, is there a control that would wrap this thing? Ah by the way, it's ToolTipText. I corrected myself lol.
-
May 29th, 2007, 01:49 PM
#6
Re: Populating large data in a single Column of Vb6 ListView Control
I think the best way to display that much text and have it stay on the screen long enough for someone to actually read through it all is a multiline textbox.
-
May 30th, 2007, 06:26 AM
#7
Thread Starter
New Member
Re: Populating large data in a single Column of Vb6 ListView Control
Yeah! That is one of the work arround solution.
However, in my case the constraint is that I need to use the Listview only, as I am populating a whole lot of Data (i.e. multiple Records with other fields also), into the Listview. hence I need a solution as to how to accomodate such a large Text String into a single column of the Listview.
Is this a bug or a constraint in the Listview Control provided by microsoft in it's VB6.
-
May 30th, 2007, 06:35 AM
#8
Re: Populating large data in a single Column of Vb6 ListView Control
 Originally Posted by riteshratna
 Is this a bug or a constraint in the Listview Control provided by microsoft in it's VB6.
It is a designed behavior. The ListView was not created to display multiline entries. As such, your program specs probably need to be modified.
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
|