Solved

Unequal width columns in CheckedListBox

Posted on 2014-02-26
2
293 Views
Last Modified: 2014-03-05
In VB 2008, I'm creating a CheckedListBox to display several rows from a DataTable so that the user can select one or several. For each row, I want to display three items of information. The first, the name, is by far the longest; the other two are a date and a dollar amount.

I have set

        clb.UseTabStops = False
        clb.UseCustomTabOffsets = True
        clb.CustomTabOffsets.Add(200)
        clb.CustomTabOffsets.Add(100)

and then created the items for clb putting a vbTab between each item of the row. However, VB is automatically sorting the tabs in numerical order, so the first tab offset ends up being 100, the second 200, and I don't have enough space for the name to display.

Any suggestions for how to set up the display so the first column is wider than the second? I'm open to using a different control that would allow me to select multiple rows and display three items per row.
0
Comment
Question by:ElrondCT
2 Comments
 
LVL 78

Accepted Solution

by:
David Johnson, CD, MVP earned 500 total points
ID: 39893854
use a datagrid instead
0
 
LVL 20

Author Comment

by:ElrondCT
ID: 39907293
A bit more tedious to code the setup and handling, but that does seem like the best solution.
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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

912 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

22 Experts available now in Live!

Get 1:1 Help Now