Avatar of Mike Eghtebas
Mike EghtebasFlag for United States of America

asked on 

Sort list box, vb.net

I have the following list box made with multiple columns:User generated imageI want to be able to sort this list box by one column (any of those at display).

Question: How can I do this?

I know, I could capture Y position at mouse down (this will help me to identify when the header area is clicked). I can also capture X position if column widths doesn't change.

So mouse down even alone could help me to identify what column has been clicked on. But I have to be able either:
a. Keep the column widths fixed, or
b. Read the column widths when the list box gets filled in.

Could you possibly think of a solution for a and/or b above.

Gridview is a good option but I want something very light weight. Are there some other middle ground controls like ListView we had in vb 6.0?

Thanks.
Visual Basic.NET.NET Programming

Avatar of undefined
Last Comment
HainKurt
ASKER CERTIFIED SOLUTION
Avatar of HainKurt
HainKurt
Flag of Canada image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
.NET Programming
.NET Programming

The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.

137K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo