Panels and Splitters
- From: "ohadasor@xxxxxxxxxxxxxxxx" <ohadasor@xxxxxxxxxxxxxxxx>
- Date: 7 May 2006 06:18:18 -0700
Hello,
I'm using .NET Framework 2.0. I'm creating several panels, one above
the other, with splitters between them. I'm using Splitter and not
SplitContainer, because the latter is such a big mess when you need to
put splitters between more than two windows.
To be more specific, my splitters and panels are like that:
_
|_|
|_|
|_|
Where the rectangles are the panels and the underscores are the
splitters. When I drag a splitter up, it can go up as much as I want.
Even make the top panel very small. But when I want to drag them down,
it lets me drag only to a specific point, so I cannot make the lower
panel small.
Anyway, here is my code:
private void InitPanel()
{
panel = new Panel();
panel.Tag = this;
panel.BorderStyle = BorderStyle.Fixed3D;
panel.Dock = DockStyle.Top;
panel.AllowDrop = true;
panel.DragEnter += new DragEventHandler(panel_DragEnter);
panel.DragDrop += new DragEventHandler(panel_DragDrop);
panel.MouseUp += new
MouseEventHandler(chart.Panel_MouseUp);
chart.PanesPanel.Controls.Add(panel);
panel.BringToFront();
}
private void CreateSplitContainer()
{
splitter = new Splitter();
splitters.Add(splitter);
splitter.MinExtra = splitter.MinSize = 0;
splitter.Dock = DockStyle.Top;
splitter.SplitterMoved += new
SplitterEventHandler(chart.SplitContainer_Move);
splitter.MinSize = 15;
chart.PanesPanel.Controls.Add(splitter);
splitter.BringToFront();
}
The problem is that when, using the splitters, I'm trying to make the
panels smaller, they have a limit of how small it can go, and it's
about 100-150 pixels (quite much). I need a possibility to use the
splitters to make the panels much smaller, such as 15 pixels.
How can I do that?
Thanks!
.
- Prev by Date: WMI Reference
- Next by Date: Re: Simple optimization
- Previous by thread: WMI Reference
- Next by thread: Re: Memory requirements for C# windows application
- Index(es):
Relevant Pages
|