Solved

advanced datagrid, drop down list, listbox

Posted on 2003-10-26
3
242 Views
Last Modified: 2006-11-17
hi
I am looking after the following "FREE" controls:
A datagrid list box which allows people to drag and drop rows so that they are sorted. Up and Down buttons are required too.
A dropdown list which does text auto complete like internet explorer does with the address field.

Thank you.
F
0
Comment
Question by:fouadkassab
  • 2
3 Comments
 
LVL 3

Expert Comment

by:the-edge
Comment Utility
for the dropdown list which does text auto complete like internet explorer does with the address field take a look at this:

http://www.vbcity.com/forums/faq.asp?fid=38&cat=ListBox%2FComboBox
0
 

Author Comment

by:fouadkassab
Comment Utility
the function does not work. anyway, the signature of the key up function is not identical to the one in the example.
0
 
LVL 3

Accepted Solution

by:
the-edge earned 500 total points
Comment Utility
here's a sub in vb.net that autocomplete a combobox. you should call it within the KeyUp event of the combobox, passing the combobox and the e.KeyCode as parameter:

    Private Sub myCombo(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles cbxUtente.KeyUp
        cbxAutocomplete(myCombo,e.Keycode)
    End Sub


    Sub cbxAutocomplete(ByVal myCombobox As ComboBox, ByVal myKey As Keys)
        Dim index As Integer
        Dim actual As String
        Dim found As String

        'Do nothing for certain keys such as the arrows and backspace and delete
        If myKey = Keys.Back Or myKey = Keys.Left Or myKey = Keys.Right Or (myKey = Keys.Up) Or (myKey = Keys.Delete) Or (myKey = Keys.Down) Then
            Exit Sub
        End If
        ' Store the actual text that has been typed
        actual = myCombobox.Text

        ' Find the first match for the typed value
        index = myCombobox.FindString(actual)

        'Get the text of the first match
        If index > -1 Then
            found = myCombobox.Items(index).ToString()
            'this.comboBox1.Text = found;
            myCombobox.SelectedIndex = index
            ' Select the automatically added text so further typing will replace it
            myCombobox.SelectionStart = actual.Length
            myCombobox.SelectionLength = found.Length
        End If
    End Sub
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now