Groups | Blog | Home
all groups > dotnet faqs > october 2005 >

dotnet faqs : Combo Box Locked Property


Ejs
10/26/2005 2:40:41 PM


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.M. Altaf [MVP]
10/29/2005 12:00:00 AM

Hi,

Simply change the DropDownStyle property of the combobox to =
DropDownList.=20

-Altaf



-------------------------------------------------------------------------=
-------
All that glitters has a high refractive index.=20
www.mendhak.com=20
[quoted text, click to view]


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 =3D 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
?.


Ken Halter
11/2/2005 8:41:05 AM
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..

[quoted text, click to view]

Hi,

Simply change the DropDownStyle property of the combobox to DropDownList.

-Altaf




All that glitters has a high refractive index.
www.mendhak.com
[quoted text, click to view]


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

Terry Cai
12/3/2005 9:46:52 PM

Thanks so much for Altaf's valuable tip!

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

--
Terry Ca
-----------------------------------------------------------------------
Terry Cai's Profile: http://www.hightechtalks.com/m42
View this thread: http://www.hightechtalks.com/t227049
AddThis Social Bookmark Button