TabControl "addControl" problem.

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.
 

agraham

Expert
Licensed User
Longtime 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 :(
 
D

Deleted member 103

Guest
Hello burd27,

i think it works so.;)


Ciao,
Filippo
 

Attachments

  • TabTest.sbp
    1.2 KB · Views: 214

burd27

Member
Licensed User
Thanks guys.

What a beauty!! Nicely done. Works great.

Much apprecited...yet again.

Cheers,
Burd
 
Top