C#NET2008 ListBox Set columnWidth

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lenniekuah
    New Member
    • Oct 2006
    • 126

    #1

    C#NET2008 ListBox Set columnWidth

    Hullo Good Friends,
    I need your help again, please help me.

    I am using C#NET2008 for Window Application.

    Being requested to use ListBox to display 2 columns of data, i.e. OrderNumber, OrderDate.

    How to set the column widths to display OrderNumber and OrderDate

    Please help me. Thanks.


    Cheers,
    Lennie
  • GaryTexmo
    Recognized Expert Top Contributor
    • Jul 2009
    • 1501

    #2
    There is a property on a ListBox called ColumnWidth. It looks like all columns will be the same width on this control and that you can't specify headers. I think it's just to present the data in the list differently.

    Perhaps you should look into a ListView control. Take a look at that, there should be a setting to create columns and size them independently. I believe there's also an auto size call you can make on the column so it sizes to the data in it. Let me know how that works for you.

    Comment

    • lenniekuah
      New Member
      • Oct 2006
      • 126

      #3
      Hi Gary,
      Thank you for sharing information with me.
      I will try out the ListView in C#NET. Years ago While using VB6 Iam very familiar with ListView.

      Comment

      Working...