Solved

Unequal width columns in CheckedListBox

Posted on 2014-02-26
2
286 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

707 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

16 Experts available now in Live!

Get 1:1 Help Now