Sheritlw
asked on
Return certain type of Controls from tabpage
I have a multiple tabbed form with multiple farpoint grids on each tabpage.
I need to know how to get all the controls of type farpoint grid on a particular tabpage.
How do I do that?
Thanks
I need to know how to get all the controls of type farpoint grid on a particular tabpage.
How do I do that?
Thanks
"""Gets the tabpage selected
Dim tab As TabPage = Nothing
Dim oTab As String = "Tab" & iTab
Dim tabMatch() As Control = Me.Controls.Find(oTab, True)
If tabMatch.Length > 0 Then
If TypeOf (tabMatch(0)) Is TabPage Then
tab = DirectCast(tabMatch(0), TabPage)
End If
End If
'''Trying to get controls
For Each cnt As Object In tab.Controls
If TypeOf cnt Is FarPoint.Win.Spread.FpSpread Then
cR.Cnt = cnt
sw = Me.SplitContainer2.Width
FillGridCombos()
cnt.BackColor = Color.Transparent
cnt.Sheets(0).DefaultStyle.BackColor = Color.Transparent
cnt.BorderStyle = BorderStyle.None
cnt.ActiveSheet.GrayAreaBackColor = Color.Transparent
cR.ResizeControls(sw)
End If
Next
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER