Move splitter

  • Thread starter Thread starter MFRASER
  • Start date Start date
M

MFRASER

How do I move the splitter inside of code.

if(TypeA)
{
this.pnlHXMLList.Visible = false;
this.splTop.is.Top = 65;

}

else

{

this.pnlHXMLList.Visible = true;

this.splTop.is.Top = 165;

}
 
Hi MFRASER,

You cannot move the splitter because it is *docked* in terms of
WindowsForms' docking. When controls are docked location and normally one of
the sizes (unless the control is docked *Fill*) cannot be changed. In a case
of docking *Top* for example only controls Height can be changed.

In order to move the splitter programmatically (in your case the splitter is
docked *Top* as far as I understand from the code you posted) up or down you
can change the Height of the control which is above the splitter.
 
Ok. I will add all the controls to a panel and change the heighth of
the panel instead of the location of the splitter. Thanks


*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 
MFRASER said:
How do I move the splitter inside of code.

if(TypeA)
{
this.pnlHXMLList.Visible = false;
this.splTop.is.Top = 65;

}

else

{

this.pnlHXMLList.Visible = true;

this.splTop.is.Top = 165;

}

mSplitterVert.SplitPosition = pos;
HTH,
Andy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top