Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4577142
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T20:18:17+00:00 2026-05-21T20:18:17+00:00

We’re revamping our winforms user interface to use the Weifen Luo DockPanel Suite and

  • 0

We’re revamping our winforms user interface to use the Weifen Luo DockPanel Suite and since our old UI didn’t have tabs, we would like to show a ballon tooltip when a new window is docked to the document area, informing users that they may rip-out the document and float it wherever they would like.

I figure to do this I need to be able to programatically determine the location of a docked window’s tab. Our DockPanel’s DocumentStyle is set to DockingWindow, so tabs are always shown for any windows docked into the ‘document’ area.

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T20:18:18+00:00Added an answer on May 21, 2026 at 8:18 pm

    From your description it’s unclear if you want to precisely position the bubble over the newly created tab, or if you are fine with it appearing over the tabstrip, at a fixed x-axis location, but positioned correctly based on the y-axis position of the strip (this is the simpler of the two approaches).

    So I will provide a solution for the easier scenario, and options for the more complex scenario.

    First the easy solution. When the tabs are on top, the Bounds.Top and ClientRectangle.Top values are not the same. When the tabs are on the bottom they are. We can use this information along with the Bounds.Height and Bounds.Top to compute the proper y-axis location.

    Below is some sample code that does just this, albeit Naiive. (e.g. It doesn’t handle a doc immediately after a create different than if it happened due to user dragging a window, this is left as an exercise for the reader.)

    When setting up DockContent, register the event:

    class DocumentWindow : DockContent {
        //...
    }
    
        DocumentWindow doc = new DocumentWindow();
        doc.Text = "Document 1";
        doc.DockStateChanged += new EventHandler(doc_DockStateChanged);
        doc.Show(this.dockPanel1, DockState.Document); 
    

    When processing the event:

    void doc_DockStateChanged(object sender, EventArgs e)
    {
        DockContent doc = sender as DockContent;
        if (doc != null)
        {
            if (doc.DockState == DockState.Document)
            {
                Debug.Write("Client:");
                Debug.WriteLine(doc.ClientRectangle);
                Debug.Write("Bounds:");
                Debug.WriteLine(doc.Bounds);
                int y = doc.ClientRectangle.Top == doc.Bounds.Top ? doc.ClientRectangle.Bottom : doc.Bounds.Top;
                this.toolTip1.Show("You may tear this \r\nsucker out any \r\ntime you like!", doc.PanelPane, doc.PanelPane.Right, y, 5000);
            }
        }
    }
    

    If you want the fancier approach things will not be as easy. The options I’ve come up with
    for you are below:

    1) Alter the base library code to make the DockPaneStripBase.Tab class public and expose the tabs rectangle.

    2) Implement your own custom DockPaneStrip as illustrated in the DockSample application code.

    3) Examine the code for options 1 and/or 2 and devise a scheme that allows you to compute the location to place the tooltips.

    FYI, for others reading this who wish to understand the amount of effort involved in the fancier approach.
    The source for both WeifenLuo DockPanel and the DockSample app may be obtained from:
    http://sourceforge.net/projects/dockpanelsuite/files/DockPanel%20Suite/2.5.0%20RC1/
    It’s the package name ending in _Src.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I am trying to understand how to use SyndicationItem to display feed which is
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.