老师,我在dll里往FoxTable的Panel上动态创建了一个控件,比如MyTab,这个创建的tabcontrol代码指定了name是MyTab1,然后我如何用代码来通过MyTab1找到这个MyTab控件呢?
Public Function Create(pl As Foxtable.WinForm.Panel) As Object
aa = New MyTab '定义新的TabControl
aa.Width = pl.Width 'FT的panel的宽就是tab的宽
aa.Height = pl.Height
aa.Name = "MyTab1"
AddHandler aa.ItemRemoved, New ItemControl.ItemRemovedEventHandler(AddressOf Tab_ItemRemoved)
AddHandler aa.SelectedTabChanging, New EventHandler(Of SuperTabStripSelectedTabChangingEventArgs)(AddressOf Tab_SelectedTabChanging)
AddHandler aa.SelectedTabChanged, New EventHandler(Of SuperTabStripSelectedTabChangedEventArgs)(AddressOf Tab_SelectedTabChanged)
AddHandler aa.TabItemClose, New EventHandler(Of SuperTabStripTabItemCloseEventArgs)(AddressOf Tab_Closing)
Dim item As New MyTabItem With {.Name = "个人门户", .Text = "个人门户", .CloseButtonVisible = False}
aa.Tabs.Add(item) '然后tab里增加这个item
pl.BaseControl.Controls.Add(aa) 'ft然后在增加这个tab
Return Nothing
End Function
如何能在其他的函数中得到这个MyTab1来进行别的工作呢?
我看了一下帮助,使用Ctyp,那么该如何使用呢?
dim c as 类型 = ctype(值,类型),这个类型是MyTab,那么值是什么呢?