CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2000
    Posts
    1

    ListBox Sorted Property

    Hi,
    I use VB6 to create a form, which contains a listbox and another command button.
    I try to use the button to change the Sorted Property of the listbox in runtime (List1.Sorted = True/False)
    But when I click the button, it said "cannot change read only property"
    Is that sorted property can't be changed in runtime??



  2. #2
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Re: ListBox Sorted Property

    The sort property of a listbox can only be set at design time. You will need to write your own procedure to sort the listbox.

    Tom Cannaerts
    [email protected]

    The best way to escape a problem, is to solve it.
    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

  3. #3
    Join Date
    May 1999
    Posts
    3,332

    Re: ListBox Sorted Property

    correct, the Sorted property can only be set at design-time.
    The listView control allows you to change the sorting order and so on at runtime.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured