#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Location
    Montreal, Canada
    Posts
    486
    Rep Power
    12

    Adding an EVENTS to a ComboBox you generate ?


    Hi,

    I have a NumericUpDown and when the user change it, it's create or delete group box that are a CSearch class that I created.

    Inside that group box I have 2 items, a textbox and a combobox.

    I need to add an events on the combox soo when the user type a letter, it's automaticaly generate a list that start from what he typed to the end.

    I know how to generate the list, my problem is not there. Is how do a add an even Function to the combobox ?

    here is how I create the groupbox that is a CSearch object and where I create the combobox

    Code:
        Public Function CreateNewCSearch(ByVal grp As GroupBox) As CSearch
            'Creation of a new CSearch instance
            Dim CICSearch As New CSearch()
            CICSearch.SetValues(iCptCSearchObj)
    
            arrCSearch(iCptCSearchObj) = CICSearch
            iCptCSearchObj += 1
    
            ReDim Preserve arrCSearch(iCptCSearchObj)
    
            'Adding new controls to the groupbox or form page
            grp.Controls.AddRange(New Control() {CICSearch.CboChampObject})
            grp.Controls.AddRange(New Control() {CICSearch.TxtCritereObject})
            grp.Controls.AddRange(New Control() {CICSearch.GrpBoxObject})
    
            Return CICSearch
        End Function
    I hope someone can help me ??? cause I don't even know where and when to start.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Location
    Montreal, Canada
    Posts
    486
    Rep Power
    12
    Should I create a new Class of ComboBox that inherits its ? and then add a keydown function to it ?

    would that work ? would it be called each time you use the key_down ?

    That's what I am wondering cause I don't see how I could create a class like that.

    I used class before to add new property in it, or function that you would call manually but no function that are automatically called bythem self !

    and I think I am complicating everything no ??
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Location
    Montreal, Canada
    Posts
    486
    Rep Power
    12
    no one know ?

    I only have that to finish and a little thing that will take me less then 30 minutes to complete depending on how I kick my ***.

    after that, all my time will be to think of how user will work with the Payment and how a program need to work with that etc...

    soo help me please ! ! I want to finish that damn program has soon has possible to do something else !

    help please
    Last edited by Watever; November 20th, 2003 at 11:25 AM.

IMN logo majestic logo threadwatch logo seochat tools logo