Please help with ChangeParent

Discussion in 'Questions (Windows Mobile)' started by skipper, Jan 2, 2008.

  1. skipper

    skipper Member Licensed User

    My app has 2 forms. Form1 contains an invisible ComboBox (a kind of "global" combobox that should be used eveywhere) and a Button switching to Form2.

    Form2 contains a Panel containing a TextBox. When TextBox1 get the focus, I would like to show the ComboBox. At the same time I would like to be able to move the ComboBox from a parent to another. I following code does not work (also placing TextBox directly on Form2, without the second ChangeParent instruction). I'm sure I'm wrong. Is someone there that could give me please some guidelines?

    Sub Globals
    'Declare the global variables here.
    End Sub

    Sub App_Start
    frmlib.New1 ("Form1",B4PObject(1))
    frmlib.ChangeParent ("ComboBox1","Form2")
    frmlib.ChangeParent ("ComboBox1","Panel1")
    End Sub

    Sub Button1_click
    End Sub

    Sub Text1_GotFocus
    Combobox1.Width =TextBox1.Width
    ComboBox1.Top =TextBox1.Top
    ComboBox1.Left =TextBox1.Left
    End Sub
  2. skipper

    skipper Member Licensed User

    Please discard my request...

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice