J
Jeffrey Walton
Hi All,
I have a horizontal Splitter, for which I would like the top panel to
remain 20 pixels in height. I do this because I have a containter on
it, and I overide the OnPaint method. It is being painted as a band
similar to that of Disk Defragmentor.
Any ideas on how to disable a Splitter panel from being resized? I've
locked the controls (it stops me from resizing it at design time);
I've set SplitterFixedPanel = Panel1 [1,5]; and I've set
SplitterDistance to the same as design time [2]. Overriding Moving
events causes a runtime error when I try to force the control's height
back to the desired height through the Height property [3, 4]. From
[5,6]: "Use the Panel1 [or Panel2] property to configure the left
panel of a vertical SplitContainer or the top panel of a horizontal
SplitContainer. For example, you can specify the minimum size of the
panel by changing the value of the Panel1MinSize property, set the
FixedPanel property to Panel1 so that the panel remains the same size
when the container is resized, or you can get or set the panel's
BackgroundImage and BackgroundImageLayout properties."
Nothing stops this damn thing from moving. Any help would be
appreciated.
Thanks,
Jeff
[1] http://msdn2.microsoft.com/en-us/library/system.windows.forms.splitcontainer.fixedpanel(vs.80).aspx
[2] http://msdn2.microsoft.com/en-us/li...s.splitcontainer.splitterdistance(VS.80).aspx
[3] http://msdn2.microsoft.com/en-us/li...rms.splitcontainer.splittermoving(VS.80).aspx
[4] http://msdn2.microsoft.com/en-us/li...orms.splitcontainer.splittermoved(VS.80).aspx
[5] http://msdn2.microsoft.com/en-us/library/system.windows.forms.splitcontainer.panel1(VS.80).aspx
[6] http://msdn2.microsoft.com/en-us/library/system.windows.forms.splitcontainer.panel2(VS.80).aspx
I have a horizontal Splitter, for which I would like the top panel to
remain 20 pixels in height. I do this because I have a containter on
it, and I overide the OnPaint method. It is being painted as a band
similar to that of Disk Defragmentor.
Any ideas on how to disable a Splitter panel from being resized? I've
locked the controls (it stops me from resizing it at design time);
I've set SplitterFixedPanel = Panel1 [1,5]; and I've set
SplitterDistance to the same as design time [2]. Overriding Moving
events causes a runtime error when I try to force the control's height
back to the desired height through the Height property [3, 4]. From
[5,6]: "Use the Panel1 [or Panel2] property to configure the left
panel of a vertical SplitContainer or the top panel of a horizontal
SplitContainer. For example, you can specify the minimum size of the
panel by changing the value of the Panel1MinSize property, set the
FixedPanel property to Panel1 so that the panel remains the same size
when the container is resized, or you can get or set the panel's
BackgroundImage and BackgroundImageLayout properties."
Nothing stops this damn thing from moving. Any help would be
appreciated.
Thanks,
Jeff
[1] http://msdn2.microsoft.com/en-us/library/system.windows.forms.splitcontainer.fixedpanel(vs.80).aspx
[2] http://msdn2.microsoft.com/en-us/li...s.splitcontainer.splitterdistance(VS.80).aspx
[3] http://msdn2.microsoft.com/en-us/li...rms.splitcontainer.splittermoving(VS.80).aspx
[4] http://msdn2.microsoft.com/en-us/li...orms.splitcontainer.splittermoved(VS.80).aspx
[5] http://msdn2.microsoft.com/en-us/library/system.windows.forms.splitcontainer.panel1(VS.80).aspx
[6] http://msdn2.microsoft.com/en-us/library/system.windows.forms.splitcontainer.panel2(VS.80).aspx