Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - Change Tab as container
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Change Tab as container

 Post Reply Post Reply
Author
Message
gibra View Drop Down
Senior Member
Senior Member


Joined: 31 October 2008
Location: Italy
Status: Offline
Points: 288
Post Options Post Options   Thanks (0) Thanks(0)   Quote gibra Quote  Post ReplyReply Direct Link To This Post Topic: Change Tab as container
    Posted: 26 January 2018 at 11:25am
I know that we can use InserItem to set the inserted tab in a new tab.

Instead I can't find a method to move a grid (TDBGrid) control between different existings tab.

Example: I have a TabControl1 with three tabs (with no TabPage) and a grid on first tab (0).
when I select a different tab (1 or 2) I want to move the grid on new selected tab.

I tried this, but get Out of memory error:

Private Sub TabControl1_BeforeItemClick(ByVal Item As XtremeSuiteControls.ITabControlItem, Cancel As Variant)
    Dim curTab As TabControlItem
    Set curTab = Item
    Set TDBGrid1.Container = curTab    '<- Error 7 - Out of memory
End Sub

How to?
SuiteControl 15.3.1
gibra
CJ SuiteControl v: 13.x to 19.x
Windows 10 64bit
VS2019 - VB6.0 SP6
<a href="http://nuke.vbcorner.net/Home/tabid/36/language/en-US/Default.aspx" rel="nofollow">VS/VB 6.0 Installer v6.8
Back to Top
gibra View Drop Down
Senior Member
Senior Member


Joined: 31 October 2008
Location: Italy
Status: Offline
Points: 288
Post Options Post Options   Thanks (1) Thanks(1)   Quote gibra Quote  Post ReplyReply Direct Link To This Post Posted: 27 January 2018 at 11:03am
I answer myself. Wink

I have discovered that also the Codejock TabControl behaves like all the other 'tabbed' controls (SSTab and TabStrip) that is:
when you select a tab moves the controls that belong to the other tabs.

In my case, I want to display the same TDBGrid control on each tabs, I simply do this:

Dim m_GridLeft As Long

Private Sub Form_Load()
    m_GridLeft = TDBGrid1.Left
    TabControl1.Item(0).Selected = True
End Sub

Private Sub TabControl1_SelectedChanged(ByVal Item As XtremeSuiteControls.ITabControlItem)
    TDBGrid1.Left = m_GridLeft
    TDBGrid1.Visible = True
    TDBGrid1.ZOrder
End Sub


HTH
Smile
gibra
CJ SuiteControl v: 13.x to 19.x
Windows 10 64bit
VS2019 - VB6.0 SP6
<a href="http://nuke.vbcorner.net/Home/tabid/36/language/en-US/Default.aspx" rel="nofollow">VS/VB 6.0 Installer v6.8
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.125 seconds.