Combo Box Locked Property

E

Ejs

In old Vb6 there was the ComboBox.locked property which let me to show
information but inhibit the user to modify them. Consider an application
with different security level in this case different account may edit/change
values or not. My idea is

For each ctrl as controls in Form.controls
ctrl.readonly = true 'or result of account test function
next

I seach and dont find how to make it, please someone should Help me ???.
so, Who I make my own Combo Box Locked Property programmatily in VB.NET
?.


Thanks in advance
 
S

S.M. Altaf [MVP]

Hi,

Simply change the DropDownStyle property of the combobox to DropDownList.

-Altaf



--------------------------------------------------------------------------------
All that glitters has a high refractive index.
www.mendhak.com


In old Vb6 there was the ComboBox.locked property which let me to show
information but inhibit the user to modify them. Consider an application
with different security level in this case different account may edit/change
values or not. My idea is

For each ctrl as controls in Form.controls
ctrl.readonly = true 'or result of account test function
next

I seach and dont find how to make it, please someone should Help me ???.
so, Who I make my own Combo Box Locked Property programmatily in VB.NET
?.


Thanks in advance
 
K

Ken Halter

HTML posts eh? Oh well... what ever...

In .Net, is the style settable at runtime? If not, the OP still needs the
Locked functionality. If the style's not settable at runtime (in VB6, it's
not, without APIs anyway), there's still a simple way to deal with the
problem. Just use 2 combos. Transfer the data and show the one that's
appropriate. Hide the other.

--
Ken Halter - MS-MVP-VB (visiting from VB6 world) - http://www.vbsight.com
Please keep all discussions in the groups..


Hi,

Simply change the DropDownStyle property of the combobox to DropDownList.

-Altaf




All that glitters has a high refractive index.
www.mendhak.com


In old Vb6 there was the ComboBox.locked property which let me to show
information but inhibit the user to modify them. Consider an application
with different security level in this case different account may edit/change
values or not. My idea is

For each ctrl as controls in Form.controls
ctrl.readonly = true 'or result of account test function
next

I seach and dont find how to make it, please someone should Help me ???.
so, Who I make my own Combo Box Locked Property programmatily in VB.NET
?.


Thanks in advance
 
T

Terry Cai

Thanks so much for Altaf's valuable tip!

I had same problem before, and now it works great after I changed th
property setup
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top