?
Solved

Split container, how do you specify panel widths?

Posted on 2008-10-06
7
Medium Priority
?
5,429 Views
Last Modified: 2012-05-05
Experts,

I've added a simple splitcontainer control, which has been set to vertical split, and fill.

I'd like to set the width of the left panel to 250px, is this possible?
0
Comment
Question by:mhouldridge
  • 3
  • 2
5 Comments
 
LVL 18

Accepted Solution

by:
Priest04 earned 1000 total points
ID: 22652266
Set spliContainer's FixedPanel property to Panel1, and sets Panel1MinSize to 250.

Goran
0
 
LVL 14

Assisted Solution

by:CyrexCore2k
CyrexCore2k earned 1000 total points
ID: 22652281
Unfortunately you can't set the panel directly:

mySplitContainer.Panel1.Width = 250

You can however change the SplitterDistance value:

spltHorizontal.SplitterDistance = 250;

However the splitter has some padding and whatnot so you'll have to adjust accordingly. It'll probably be something close to

spltHorizontal.SplitterDistance = 252;
0
 
LVL 18

Expert Comment

by:Priest04
ID: 22946785
I disagree, my solution is tested, and it works,

Goran
0
 
LVL 14

Expert Comment

by:CyrexCore2k
ID: 22947647
Mine works too.
0
 
LVL 18

Expert Comment

by:Priest04
ID: 22948560
Yes, your works too, with one addition: you also need to set FixedPanel property to Panel1, since when resizing, Splitterdistance also changes.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month15 days, 3 hours left to enroll

840 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