Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disabling and sorting ListBox 1

Status
Not open for further replies.

Brezhnev

Programmer
Sep 25, 2002
53
CA
Hi all!
I am using listbox ...i populated it with bunch of items from the table...I am interested only in one particular item ( i.e. to update , move , sort ). So I am highlighting
this item and thru command buttons updating the first column which is basically a number. I need to prevent user from switching focus on other items... so the rest of the items serving only display and sorting purposes. I also need to sort the list again because of the increasing or decreasing number of the first column. I tried to overight Click and DblClick events, but still able to set focus on other items in the list. Second of all , do I have to re-ADD list items after the number changed in terms of sorting it appropriately ?


Please help
 
Brezhnev

In order to disable an item in a listbox, put a prefix to each items to be disabled with "\".
In order to sort your listbox, I would suggest you make your rowsource an Array and when it comes time to sort it use ASORT(). Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top