Solved

VB.net get right custom task pane above bottom one

Posted on 2012-04-01
4
278 Views
Last Modified: 2012-04-03
Hi. I am using the code at the bottom to load two task panes. My problem is that the bottom task pane is above the right one. Is there a way to get the right task pane above the bottom one?

1

Public Class ThisAddIn


    Private _tpSqlEdit As TpSQLEdit
    Public Shared TpSqlEditCustomTaskPane As Microsoft.Office.Tools.CustomTaskPane 'the Shared means that it can be used outside of this class
    Private oUserControl1 As UserControl1
    Public Shared oRightTaskPane As Microsoft.Office.Tools.CustomTaskPane 'the Shared means that it can be used outside of this class
    'Private taskPaneControl1 As Microsoft.Office.Tools.Custo


    Private Sub ThisAddIn_Startup() Handles Me.Startup
        'Fire the Custom TaskPane

        AddTpSqlEdit()
        AddSideTaskPane()


    End Sub

    Private Sub ThisAddIn_Shutdown() Handles Me.Shutdown

    End Sub

    'Create the Custom TaskPane and Dock Bottom
    'You must Add your Control here
    Private Sub AddTpSqlEdit()
        _tpSqlEdit = New TpSQLEdit()
        TpSqlEditCustomTaskPane = CustomTaskPanes.Add(_tpSqlEdit, "SELECT Elements")
        TpSqlEditCustomTaskPane.DockPosition = Office.MsoCTPDockPosition.msoCTPDockPositionBottom
        'Show TaskPane
        TpSqlEditCustomTaskPane.Visible = True

    End Sub

    Public Sub AddSideTaskPane()
        oUserControl1 = New UserControl1
        oRightTaskPane = CustomTaskPanes.Add(oUserControl1, "FROM Elements")
        oRightTaskPane.DockPosition = Office.MsoCTPDockPosition.msoCTPDockPositionRight
        oRightTaskPane.Width = 390

        'Show TaskPane
        oRightTaskPane.Visible = True
 
    End Sub




End Class
0
Comment
Question by:murbro
  • 2
  • 2
4 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
Comment Utility
What happens if you change the sequence of method calls from

        AddTpSqlEdit()
        AddSideTaskPane()

to

        AddSideTaskPane()
        AddTpSqlEdit()
0
 

Author Comment

by:murbro
Comment Utility
Hi

I tried that before I posted this. It unfortunately didn't change anything.

Thanks
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
Comment Utility
0
 

Author Closing Comment

by:murbro
Comment Utility
thanks very much
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now