473,385 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Need listbox that can scroll but not allow user to change selection

1
I have a form where the user can add different criteria. Then, also on that form, I have a listbox with all possible items. When the user changes the criteria, I want to indicate in the listbox which items match the criteria. If I use SetSelected, the items get highlighted, like I want, however, it is possible for the user to click in the listbox and change the selection. If I set the enabled property of the listbox to false, then the user cannot change the selection, but they also cannot scroll the listbox to see all of the selected items.

Is there a way to allow the scrollbars to work, but not allow the user to change the selections in the listbox (perhaps with mouse events), or is the answer to choose another control (not listbox) that will do what I would like? I want to show both the selected and non-selected items in the same control, so the user can see where the "gaps" are helping them to know if they need to change the criteria they entered.
Feb 11 '10 #1
1 2032
tlhintoq
3,525 Expert 2GB
What about a CheckedListBox?

Since I can't see the form I don't completely understand why you are selecting criteria *over here* then showing the selections *over there*. It seems to me that you could just use the CheckedListBox to simplify the GUI and handle both needs.
Feb 11 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Irene | last post by:
I'm developing a Web application where a user selects from a listbox which can have many items. The initial display only shows about 10 items. After a postback, the listbox is automatically...
1
by: Annette Massie | last post by:
I would like to have a form that lists current addresses being used. On this form I would also like to have a command button that would allow the user to add an address if they do not see it...
2
by: (Pete Cresswell) | last post by:
Seems like I've been here before, but can't find anyting in Google. I've got two list boxes on a form. Seems to me like the inactive ListBox's selection rectangle should be something like...
3
by: charliewest | last post by:
Can someone recommend a fairly easy to use ASP.NET custom calendar control that makes it easy for the user to select the month and year - versus the inherent "paging" that is used in the default...
3
by: Lenard Gunda | last post by:
Hi, I have the following problem. On a page I have a multiple selection listbox. It contains a lot of items. When items near the bottom are selected, and I do a postback, the control jumpst to...
10
by: Adam Clauss | last post by:
I have a page containing a list box. This list may contain duplicate items - in which the ORDER is important. ex: a b b a is significant as compared to: b
3
by: Kevin Walzer | last post by:
I'm trying to set the active item in a Tkinter listbox to my application's currently-defined default font. Here's how I get the fonts loaded into the listbox: ...
2
by: ApexData | last post by:
I am working on a lookup form, where the user will enter LastName FirstName and check for duplicates. I have a list box that is bound to a table of 200 members. After the user enters the name, I...
7
by: Lit | last post by:
Hi, How can I capture the vertical scroll bar position for a Listbox. I have a Listbox of 100 items + when I click on it I post back remove the item selected. After returning to the client...
4
by: kimiraikkonen | last post by:
Hi, I have a odd but a known question about listbox. I know listbox control can provide multi-select, multi-extendend selections. But i wonder if this selection type belongs to them or it has...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.