Solved

Annoying ListView Problem

Posted on 2000-03-23
14
205 Views
Last Modified: 2010-05-02
I've got a problem with a ListView......

Basically when I hightlight any ListItem in the ListView with the cursor; the last three characters of the item are replaced with dots; something like this, say the ListItem was RST504, once highlighted it would display RST...

It is nothing to do with word length, as it appears to do this with ListItems of any length but its pretty annoying.

Can you help.

Thanks,

Matt.
0
Comment
Question by:Matt_Unsworth
  • 6
  • 5
  • 3
14 Comments
 
LVL 10

Expert Comment

by:caraf_g
ID: 2649755
Weird. What version of VB are you using. I'm checking this with VB6 SP3 and am having no problems whatsoever.
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 2649851
Try changing to ReportView and back (via code), I had this problem too and solved it like that.
It seems that internally the listview defines a small column width, and only changing to ReportView and back, the problem is resolved (it seems to recalculate this col width)
0
 
LVL 10

Expert Comment

by:caraf_g
ID: 2649877
Ah wait a sec. You're *not* using report view?

<scarpers off to try out angelIII's suggestion>
0
 
LVL 10

Expert Comment

by:caraf_g
ID: 2649890
Ah yes..... !

You're right, Angel.

I first tried it out and the problem wouldn't happen. Then, I had a brain wave and I tried the Microsoft Common Controls version 5 (which is still shipped with VB6) and I could reproduce it.

So, Matt, are you using VB5? Or VB6? If you're using VB6 could it be you're using Microsoft Windows Common Controls version 5?
0
 

Author Comment

by:Matt_Unsworth
ID: 2653849
Adjusted points from 10 to 30
0
 

Author Comment

by:Matt_Unsworth
ID: 2653850
Hello Ladies & Gentlemen,

(Forgive me, I am assuming 'AngelIII' is a lady but this might be presumptious!)

I am running on VB6 with service pack 3.

I have tried stripping out the list view and have ensured that it was added from Windows Common Controls 6.0 (SP3) components, which is, incidently, my default setting.

And, yes, I am using the 'lvwReport' list view - set at run time.

I am still seeing the abbreviated version of list items!!!!!

Any more suggestions?

Thanks,

Matt.  
0
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 30 total points
ID: 2653895
Matt, i'm not a lady (sorry). angel is the translation from german of my family name HENGEL (skipping the H).

For your problem, i had another situation similar to yours.
Try to do a node.text = TRIM (node.text) and report what happens... (smile)





0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 10

Expert Comment

by:caraf_g
ID: 2653925
Hengel is Dutch for fishing rod :-)
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 2656264
caraf_g: That's true, but i think you have to agree that angel is nicer than fishing rod (smile)

0
 
LVL 10

Expert Comment

by:caraf_g
ID: 2656554
Unless it's a heavenly fishingrod <g>

PS - Engel is also Dutch for angel. Why the "III"?
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 2657912
I don't remember exactly why, but once i started using this pseudonym, i also added III. Whatsoever, angel was already used in EE, and English is not only included in my List of languages (dutch isn't), but also the international language.
0
 

Author Comment

by:Matt_Unsworth
ID: 2669148
Sorry for the delay....

Yes - that's the one - I hadn't forseen the effect of not trimming those trailing blanks!!!!

Thanks for that,

Matt
0
 
LVL 10

Expert Comment

by:caraf_g
ID: 2669173
Er?

"node.text = TRIM (node.text) "
It was a Treeview then, not a Listview?
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 2669442
No, it was a listview.
this was an error by my side, but the important point passed through...
(grin)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
consolidate or create a new vba code for performing tasks 5 62
change vba from autofit to 13.5 width? 4 28
Excel - Save a copy of work book 13 82
Spell Check in VB6 13 95
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

930 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now