all groups > dotnet windows forms > june 2005 >
You're in the

dotnet windows forms

group:

tab pages in IDE


tab pages in IDE vbtrying
6/29/2005 12:05:37 PM
dotnet windows forms:
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
Re: tab pages in IDE vbtrying
6/29/2005 1:32:04 PM
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?

[quoted text, click to view]
Re: tab pages in IDE vbtrying
6/29/2005 1:45:03 PM
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.


[quoted text, click to view]
Re: tab pages in IDE Herfried K. Wagner [MVP]
6/29/2005 10:09:22 PM
"vbtrying" <vbtrying@discussions.microsoft.com> schrieb:
[quoted text, click to view]

What's the problem?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Re: tab pages in IDE Herfried K. Wagner [MVP]
6/29/2005 10:37:42 PM
"vbtrying" <vbtrying@discussions.microsoft.com> schrieb:
[quoted text, click to view]

Did you try to select another tabpage by single-clicking it?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Re: tab pages in IDE Michael Wong
6/30/2005 12:00:00 AM
Select the other tab pages by single clicking on them. Double-clicking
will always create a default method in code.

Hope this might help

[quoted text, click to view]
Re: tab pages in IDE Mick Doherty
6/30/2005 12:00:00 AM
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).

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html

Re: tab pages in IDE vbtrying
6/30/2005 5:22:03 AM
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?


[quoted text, click to view]
Re: tab pages in IDE vbtrying
6/30/2005 7:39:04 AM
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.





[quoted text, click to view]
Re: tab pages in IDE Mick Doherty
6/30/2005 6:29:22 PM
[quoted text, click to view]

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
///

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html

AddThis Social Bookmark Button