Combo box readonly

M

moi_bobbo

I want to override the existing Combobox class and give it a
readonly property so that the backcolor of the combobox will be grey with
the forecolor being black as is the case for a textbox set to readonly?
I don't want it disabled beacuse i must be able to copy the text inside the combobox. Anyone can help me?

Thanks

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 
O

One Handed Man

Suggest that you hold the value for the currently selected index and value
in private variables in the subclass and then add event handlers to capture
index changed and value changed etc,.

If the readonly property you create is true then you reset the index and
value to the last value otherwise update the last index and value to the
newly selected ones.


Cheers - OHM
 
C

Cor

Hi OHM

Where did you been,

The newsgroup is full of datagrid problems, now everybody did hear you are
back.

Cor
 
M

moi_bobbo

But if I don't want the user to be able to select an option..
Like the readonly property for the textbox.
Or like the disabled property on the combo box, but where I can change the forecolor to black and select the text to copy. The first thing I want is to be able to select the text of a disabled combo, like the readonly property!

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 
O

One Handed Man

LOL,

Ive been starting up my own business.

As Arne would say,


I'll be back - Just give me a little time to get sorted.


Cheers Cor - OHM
 
O

One Handed Man

OK, here is another possibility. How about adding a textbox controls to the
controls collection of the combobox. This can be positioned over the
original, and you can use the change events of the combo box to update and
refresh the textbox,

There probably is another method which is easier, I'll look for you

OHM
 
M

moi_bobbo

ok, thanks, I'll check around this possibility.
I'll wait further informations...

Pete

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top