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. spitter problem

spitter problem

Scheduled Pinned Locked Moved C#
questionhelp
2 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.
  • S Offline
    S Offline
    samithas
    wrote on last edited by
    #1

    i hav a problem using the splitter.I hav tried to use it with panels and the splitting doesn't occur properly..For the form I added 3 panels. A base panel, a top panel and a bottom panel. i want to add a splitter between the top and bottom panels so that when u click and drag the panels should resize. How can I achieve this? samitha

    H 1 Reply Last reply
    0
    • S samithas

      i hav a problem using the splitter.I hav tried to use it with panels and the splitting doesn't occur properly..For the form I added 3 panels. A base panel, a top panel and a bottom panel. i want to add a splitter between the top and bottom panels so that when u click and drag the panels should resize. How can I achieve this? samitha

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      Using the designer, you have to add these in the right order. For example using a Windows Explorer-like layout, add a Panel and dock it to the left side. Add a Splitter. Now add another Panel and set the Dock property to DockStyle.Fill (just "Fill" in the designer). If you look at the code, you'll notice that the TabStops are 0, 1, and 2 respectively. The order in which these controls are added (the most important part; the TabStop in the designer determines this order but they don't have to match) is reversed:

      this.Controls.AddRange(new Control[] {
      this.panel2,
      this.splitter1,
      this.panel1});

      Why they're reversed has to do with the way AddRange works internally. Replicate this in your code and you should be fine. If nothing else, try throwing together a new project and layout the Panels and Splitters in order the way you want them. Be sure to examine the code, however, to know what's being done by the designer.

      Microsoft MVP, Visual C# My Articles

      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