Link to home
Start Free TrialLog in
Avatar of ElrondCT
ElrondCTFlag for United States of America

asked on

Unequal width columns in CheckedListBox

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.
ASKER CERTIFIED SOLUTION
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ElrondCT

ASKER

A bit more tedious to code the setup and handling, but that does seem like the best solution.