Results 1 to 5 of 5

Thread: Combo Box as read only?

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2010
    Posts
    5

    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

  2. #2
    Fanatic Member
    Join Date
    Aug 2010
    Posts
    624

    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

  3. #3
    Karen Payne MVP kareninstructor's Avatar
    Join Date
    Jun 2008
    Location
    Oregon
    Posts
    6,684

    Re: Combo Box as read only?

    This should lead you in the right direction
    http://msmvps.com/blogs/deborahk/arc...-as-a-tab.aspx

  4. #4

    Thread Starter
    New Member
    Join Date
    Nov 2010
    Posts
    5

    Re: Combo Box as read only?

    tnx!

    do you know how to make a whole panel be locked from changes made by keyboard??

  5. #5
    Karen Payne MVP kareninstructor's Avatar
    Join Date
    Jun 2008
    Location
    Oregon
    Posts
    6,684

    Re: Combo Box as read only?

    Quote Originally Posted by idansh View Post
    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
  •  



Click Here to Expand Forum to Full Width