ICONICO

Discussion Thread

UniToolbox

Message Thread

Developer ComponentFor WindowsUniToolbox

UniToolbox iconThe leading control suite for Unicode development in Visual Basic.

Posted in the UniToolbox Forum.




Unitab container and icon problem

Hi

I am  experimenting some problems by using the new  VB Controls   from Unitoolbox2 Ocx  recently purchased from  you
 order reference  #ST73369967)

First problem:
- I create a new  unitab control at runtime, and after this I create some tabs
- I create a new grid control at runtime
- I set the grid VB container to the Unitab

i want the TAB panel to show a grid control  whenever  i click on the tab panel.

this is a  simplified  Vb Code example that loads a picture instead of the grid .. but the results are the same

Option Explicit

Private WithEvents CSSTAB As UniTab
Private WithEvents pic As PictureBox

Private Sub pic_Click()
   MsgBox CSSTAB.SelectedItem.Index
End Sub
Private Sub CSSTAB_SelectionChanged(ByVal Item As UniToolbox2.Tab)
   Set pic.Container = CSSTAB
End Sub

Private Sub Form_Load()
     Set CSSTAB = Me.Controls.Add("UniToolbox2.UniTab", "CSSTAB")
   CSSTAB.Font = "@Arial Unicode MS"
   CSSTAB.Move 120, 120, Width, 2600
   CSSTAB.Visible = True
     CSSTAB.Tabs.Add , , "&T&b1"
   CSSTAB.Tabs.Add , , "T&ab2"
   CSSTAB.Tabs.Add , , "Ta&b3"
     Set pic = Me.Controls.Add("VB.PictureBox", "pic")
   pic.Move 120, 120, 300, 300
   pic.BackColor = vbRed
   pic.Visible = True
     Set pic.Container = CSSTAB
End Sub
(

Problems:
a) pic is not shown after loading the form
b) pic is shown if I change the tabs, but the event "click" is not fired
)

As explained the problem are:
If  i "put" the grid into the unitab, it works only at first time.
By changing the active tab panel  i would like the grid control to  be contained in the new tab panel.
To  do this the only way i have found is to "re-associate" the grid to the Unitab.
This  solution seems to work but the result is that  every event fired from the grid  control is lost.

The other problem i found is that: the "tab panel shortcuts keys" like VB:  &Help  (  Help) doesn't  work .
As you can see in the above  Vb code,  i add the shortcuts to "T", "a" and "b" letters  in the three tabs caption.
Even if the shortcut  text (es.: &T ) is shown, it doesn't work
That means i can not use the keyboard to select a  tab panel.

These problems are blocking my development...
Please, could you give me a solution as quick as possible?

R.Codutti
by Roberto Codutti on Feb 25 2010 8:01am Reply

Our Software Stores

IconicoAccurate Design and Development Software

BitsDuJourDiscount Deal Coupons for Windows and Mac Software Apps

Our Software Services

IcoBlogOur Official Blog

© copyright 2004-2021 Iconico, Inc. Code & Design. All Rights Reserved. Terms & Conditions Privacy Policy Terms of Use Login