• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 322
  • Last Modified:

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.
0
ElrondCT
Asked:
ElrondCT
1 Solution
 
David Johnson, CD, MVPOwnerCommented:
use a datagrid instead
0
 
ElrondCTAuthor Commented:
A bit more tedious to code the setup and handling, but that does seem like the best solution.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now