Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How do you get the grabber icon on a toolbars?

How do you get the grabber icon on a toolbars?

Scheduled Pinned Locked Moved C#
question
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    TheBlindWatchmaker
    wrote on last edited by
    #1

    How does one get the little grabber at the extreme left of a ToolBar to show? I'm designing dockable toolbars that can also be moved by the user and that visual clue would be a nice touch. Thanks! -- modified at 19:53 Wednesday 30th November, 2005

    A 1 Reply Last reply
    0
    • T TheBlindWatchmaker

      How does one get the little grabber at the extreme left of a ToolBar to show? I'm designing dockable toolbars that can also be moved by the user and that visual clue would be a nice touch. Thanks! -- modified at 19:53 Wednesday 30th November, 2005

      A Offline
      A Offline
      Andy Moore
      wrote on last edited by
      #2

      You have to draw this yourself. Here is some sample code to do this: Win32Lib.RECT rc = new Win32Lib.Rect(); rc.left = this.Left; rc.right = this.Left + this.Width; rc.bottom = this.Top + this.Height; rc.top = this.Top; if(DockStyle != DockStyle.Right && DockStyle != DockStyle.Left) { rc.left = 1; rc.right = 1 + 3; } else { rc.top = 1; rc.bottom = 1 + 3; } Win32Lib.DrawEdge( hDC, ref rc, Win32Lib.BDR_RAISEDINNER, Win32Lib.BF_RECT ); Note that this calls the Windows API using Interop to do this. This gives you the gripper that you see in VC++ 6.0, There are other ways to do this, this is just an example. Human beings were not meant to sit in little cubicles staring at computer screens all day, filling out useless forms and listening to eight different bosses drone on about about mission statements. -- Peter Gibbons

      T 1 Reply Last reply
      0
      • A Andy Moore

        You have to draw this yourself. Here is some sample code to do this: Win32Lib.RECT rc = new Win32Lib.Rect(); rc.left = this.Left; rc.right = this.Left + this.Width; rc.bottom = this.Top + this.Height; rc.top = this.Top; if(DockStyle != DockStyle.Right && DockStyle != DockStyle.Left) { rc.left = 1; rc.right = 1 + 3; } else { rc.top = 1; rc.bottom = 1 + 3; } Win32Lib.DrawEdge( hDC, ref rc, Win32Lib.BDR_RAISEDINNER, Win32Lib.BF_RECT ); Note that this calls the Windows API using Interop to do this. This gives you the gripper that you see in VC++ 6.0, There are other ways to do this, this is just an example. Human beings were not meant to sit in little cubicles staring at computer screens all day, filling out useless forms and listening to eight different bosses drone on about about mission statements. -- Peter Gibbons

        T Offline
        T Offline
        TheBlindWatchmaker
        wrote on last edited by
        #3

        Thanks for your reply, Andy. Does this require additional references? I don't see the Win32Lib in Visual C#. I'm using VS 2003, FYI. What other ways would you suggest to get the gripper?

        A 1 Reply Last reply
        0
        • T TheBlindWatchmaker

          Thanks for your reply, Andy. Does this require additional references? I don't see the Win32Lib in Visual C#. I'm using VS 2003, FYI. What other ways would you suggest to get the gripper?

          A Offline
          A Offline
          Andy Moore
          wrote on last edited by
          #4

          This is a wrapper library around the Win32 API that I created. I am using interop to make calls to the native API. This like on MSDN tells you about this function. You have to use DllImport and define the appropriate constants in your own code. If you are not sure how to interop with native libraries there are lots of articles here that explain this. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/pantdraw_6aat.asp[^] I hope this helps. Human beings were not meant to sit in little cubicles staring at computer screens all day, filling out useless forms and listening to eight different bosses drone on about about mission statements. -- Peter Gibbons

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups