-
Nov 1st, 2010, 09:03 AM
#1
Thread Starter
New Member
Combo Box as read only?
Hi, i have to questions.
1) I would like to know how do define combo box as read only.
2) How do i cancel the focus on buttens while i press the arrows on the keyboard?
tnx
-
Nov 1st, 2010, 09:12 AM
#2
Fanatic Member
Re: Combo Box as read only?
For q1 simply change the combobox's dropdownstyle to dropdownlist. For q two I'll leave it for someone else as I'm on my phone and it takes me like 10 minutes to write a paragraph
If I helped you out, please take the time to rate me
-
Nov 1st, 2010, 10:48 AM
#3
Re: Combo Box as read only?
-
Nov 1st, 2010, 11:44 AM
#4
Thread Starter
New Member
Re: Combo Box as read only?
tnx!
do you know how to make a whole panel be locked from changes made by keyboard??
-
Nov 1st, 2010, 12:02 PM
#5
Re: Combo Box as read only?
Originally Posted by idansh
tnx!
do you know how to make a whole panel be locked from changes made by keyboard??
Simple use the following where Panel1 is the name of your panel
Code:
Panel1.Enabled = False
You could also be selective, the following disables all textboxes and buttons except if it finds a button named cmdClose
Code:
Private Sub ProcessControls(ByVal ctrlContainer As Control)
For Each ctrl As Control In ctrlContainer.Controls
If ctrl.Name <> "cmdClose" Then
If TypeOf ctrl Is TextBox Then
ctrl.Enabled = False
ElseIf TypeOf ctrl Is Button Then
ctrl.Enabled = False
End If
If ctrl.HasChildren Then
ProcessControls(ctrl)
End If
End If
Next
End Sub
The above is a mod of http://msmvps.com/blogs/deborahk/arc...-on-forms.aspx
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|