Listbox control truncate the listitem in VB6

Posted on 2006-06-07
Last Modified: 2013-12-25
Hi there,
I am using Listbox control in VB6.
My problemis when it displays list item, each item is truncated.
Is there any setting that I can change to fully display each item line?

Question by:JOSHUABT
    LVL 142

    Expert Comment

    by:Guy Hengel [angelIII / a3]
    do you mean LISTBOX or LISTVIEW ?
    how exactly do you mean "truncated"?
    LVL 8

    Expert Comment

    Joshuabt, when a listbox item is too long for the listbox, there is not really much you can do.  You can allow for resizing,
    but even that will not guarantee that it fits.  I would say it is more your job to be sure it fits.  Perhaps using another control
    would be better?  Or perhaps you could cut down what is shown in the list box to something you know fits with a ... at the
    end.  Then you could upon click have another control which has scrolling and such options, such as a textbox, take that value
    for showing in complete.

    Author Comment

    Sorry, it's my mistake.
    It is ListView control and not ListBox Control.
    When I add ListItems to ListView control, some items' text property is truncated and doesn't show the full text.
    Let's say the ListItem is "OneOfMyListItemInListViewControl".
    And it appeasr as "OneOfMyList..." instead of the full text.
    I need to make sure all LIstItems show the full text.
    How can I do that?

    LVL 8

    Expert Comment

    do u have a single column in the listview or multiple columns??
    LVL 8

    Accepted Solution

    LVL 12

    Assisted Solution

    I've had the same problem in the ListView control that is contained in the Microsoft Windows Common Controls 6.0 (SP6)

    Try switching to the older version of the ListView control in the Windows Common Controls 5.0 (SP2), it'll solve your problem
    however, if you're using one of the new features in the version 6.0, such as the "ToolTipText" property of the ListItem object,
    then it won't help.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
    If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
    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…
    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…

    729 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

    15 Experts available now in Live!

    Get 1:1 Help Now