472,353 Members | 1,483 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Making a 'read-only' dropdown listbox

Hi,
I'm trying to figure out a sensible way of making a combobox (configured as
a dropdown list) behave in a read-only fashion.
Setting Enabled=False will grey the text and the background, but I want to
leave the component looking normal but not allow the user to change the
contents.
I've tried subclassing a combobox but can't see any overrides I can use to
produce this behavior.
A very last alternative will be to create a usercontrol with a label that
visually replaced the dropdown when the component is locked, but I would
much prefer to find a way of using the single native component.
Any ideas?

Cheers,
Jason
Nov 20 '05 #1
2 3325
Do you mean stopping the user from making another selection? As far as I
know, disabling it is about the only thing you can do.

"Jason Sobell" <iG******@hotmail.com> wrote in message
news:9q*****************************@40tude.net...
Hi,
I'm trying to figure out a sensible way of making a combobox (configured as a dropdown list) behave in a read-only fashion.
Setting Enabled=False will grey the text and the background, but I want to
leave the component looking normal but not allow the user to change the
contents.
I've tried subclassing a combobox but can't see any overrides I can use to
produce this behavior.
A very last alternative will be to create a usercontrol with a label that
visually replaced the dropdown when the component is locked, but I would
much prefer to find a way of using the single native component.
Any ideas?

Cheers,
Jason

Nov 20 '05 #2
Do you mean stopping the user from making another selection? As far as I
know, disabling it is about the only thing you can do.

"Jason Sobell" <iG******@hotmail.com> wrote in message
news:9q*****************************@40tude.net...
Hi,
I'm trying to figure out a sensible way of making a combobox (configured as a dropdown list) behave in a read-only fashion.
Setting Enabled=False will grey the text and the background, but I want to
leave the component looking normal but not allow the user to change the
contents.
I've tried subclassing a combobox but can't see any overrides I can use to
produce this behavior.
A very last alternative will be to create a usercontrol with a label that
visually replaced the dropdown when the component is locked, but I would
much prefer to find a way of using the single native component.
Any ideas?

Cheers,
Jason

Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: McGrull | last post by:
Sorry for my question, but I'm really a newbie on ASP. I need to make a simple page (for IIS 5.0 and up, but even for 2000 Professional IIS) that...
26
by: Alexander Farber | last post by:
Hi, I have a UNIX-server written in C, which exchanges messages with Java clients. In the message the 1 byte is its length, the 2nd a player...
6
by: mt404 | last post by:
Hi, I was wondering if someone might be able to provide some guidance on how I could make an http request from a C# library. Basically I have...
0
by: Mike Cox | last post by:
Hi. As most of you know, comp.databases.postgresql.general is a wonderful resource. What you may not know is that it has not gone through a...
351
by: CBFalconer | last post by:
We often find hidden, and totally unnecessary, assumptions being made in code. The following leans heavily on one particular example, which...
4
by: ShieldsJared | last post by:
Im looking for help making a good GUI out of pure images. I would like to embed the common controls and such, but I want to make a nice looking...
10
by: JurgenvonOerthel | last post by:
Consider the classes Base, Derived1 and Derived2. Both Derived1 and Derived2 derive publicly from Base. Given a 'const Base &input' I want to...
1
by: getelectronic | last post by:
Hi all I have a sample code to implement opc client in Python. i use a file .py making by makepy with pythonwin for Com Interface. i can get all...
14
by: mesut | last post by:
hi colleagues, I don't know if this is the right group for but it's in C# so I try. I have a #3 procedural function called GetInfo.. and those...
11
by: Rafe | last post by:
Hi, I'm working within an application (making a lot of wrappers), but the application is not case sensitive. For example, Typing obj.name,...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...

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.