TabControl "addControl" problem.

Discussion in 'Questions (Windows Mobile)' started by burd27, Apr 19, 2008.

  1. burd27

    burd27 Member Licensed User

    I am having a problem locating a Table on to a Tab Control.

    I am creating the TabControl using addObject and also a Listview table the same way. The Table is originally created on the main form (form1), but when I try to add (transfer) the Listview (table) control on to the TabControl I get an error message.

    (At this stage, this is all on the desktop only).

    Sample code and error message attached.

    As usual, it will be something simple.....any takers?

    Burd.
     
  2. agraham

    agraham Expert Licensed User

    As ListView is a library object you would need a control reference rather than a name string to use with AddControl.

    ViewTable.AddControl(ViewTasks.ControlRef,0,20,20)

    You need to do this with any control from the ControlsEx library.

    e.g
    AddObject("PBar", "ProgressBar")
    PBar.new1("Form1",0,0,100,10)
    ViewTable.AddControl(PBar.ControlRef,0,40,40)


    Unfortunately Listview doesn't seem to have a ControlRef property that exposes the underlying Listview control so I am afraid you can't use it on a Tab :(
     
  3. Filippo

    Filippo Expert Licensed User

    Hello burd27,

    i think it works so.;)


    Ciao,
    Filippo
     

    Attached Files:

  4. agraham

    agraham Expert Licensed User

    Good work-around Filippo - I wouldn't have thought of that.
     
  5. burd27

    burd27 Member Licensed User

    Thanks guys.

    What a beauty!! Nicely done. Works great.

    Much apprecited...yet again.

    Cheers,
    Burd
     
Loading...
  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