tab pages in IDE

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form, with 1 tabcontrol on it. It has 3 tab pages. I cant select a
tab page from within the IDE and place controls on it. I used to be able to
do this. Any ideas?
 
vbtrying said:
I have a form, with 1 tabcontrol on it. It has 3 tab pages. I cant select a
tab page from within the IDE and place controls on it. I used to be able
to
do this.

What's the problem?
 
The problem is this --- I can drop controls onto the 1st tab page with no
problem. If I try to select the 2nd tab page, by double clicking it, I go
immediately into the source code. The IDE is not letting me set focus to the
2nd or subsequent tabs on the tabcontrol. This is frustrating because I know
it's possible. I've used tabcontrols with multiple tab pages in the past.

Why wont the IDE let me click onto the other tab pages anymore?

Help?
 
vbtrying said:
The problem is this --- I can drop controls onto the 1st tab page with no
problem. If I try to select the 2nd tab page, by double clicking it, I go
immediately into the source code. The IDE is not letting me set focus to
the
2nd or subsequent tabs on the tabcontrol. This is frustrating because I
know
it's possible. I've used tabcontrols with multiple tab pages in the past.

Did you try to select another tabpage by single-clicking it?
 
Yes - that was the first thing I did ....

Once I build the executable, I can click on a tab page and it works fine.
Problem with that is there are no controls on that page, because I can't get
there within the IDE.
 
Select the other tab pages by single clicking on them. Double-clicking
will always create a default method in code.

Hope this might help
 
I have tried a single click - it does not work. I have been using VB since
version 4.0
and this is not normal behavior by a control. Does anybody have a solution?
 
I doubt that you're going to get the response that you want here.

Single clicking on a tab should cause the TabControl to change it's
selection to the associated TabPage.
You must then click on the TabPage to select it in the Designer as clicking
on a tab selects the TabControl and not the TabPage.

If this is not the behavior that you are seeing, then there is an error in
your development environment (assuming that you're using a standard
tabcontrol).
 
I FOUND THE RESOLUTION !!!

If you create a new form and add the tabcontrol BEFORE you add the taskpane
(from vbpowerpack), it works. If you add the taskpane BEFORE you add the
tabcontrol, the tabcontrol does not function the way it should.
 
vbtrying said:
I FOUND THE RESOLUTION !!!

If you create a new form and add the tabcontrol BEFORE you add the
taskpane
(from vbpowerpack), it works. If you add the taskpane BEFORE you add the
tabcontrol, the tabcontrol does not function the way it should.

I've not used vbpowerpack so I hadn't seen this, but the problem is in the
TaskPaneDesigner.
After looking through the Active bugs I see that you cannot edit menus
either.

Both of these problems are related and it took just a few minutes to find
the error, so I have no Idea why the original author has not fixed it after
several months.

The problem and the fix are shown below so you can modify the source and fix
your version, but I didn't look too hard at the code so there may be 1001
other problems that need sorting out ;)


in the OnSelectionChanged() method you'll see this code:

\\\
If Not selsvc Is Nothing Then
c = selsvc.PrimarySelection
If Not c Is Nothing Then
tf = CType(c, TaskFrame)
If Not tf Is Nothing Then
Me.m_lastFrameSelected = tf
tf.Parent.Refresh()
End If
End If
End If
///


Change it as follows:
\\\
If Not selsvc Is Nothing Then
c = selsvc.PrimarySelection
If Not c Is Nothing Then
If TypeOf c Is TaskFrame Then '<-- Added extra check
tf = CType(c, TaskFrame)
If Not tf Is Nothing Then
Me.m_lastFrameSelected = tf
tf.Parent.Refresh()
End If
End If
End If
End If
///
 
Back
Top