Click here to Skip to main content
15,914,010 members
Home / Discussions / C#
   

C#

 
AnswerRe: recieving output from dos Pin
Stefan Troschuetz21-Mar-07 6:54
Stefan Troschuetz21-Mar-07 6:54 
QuestionStrange behaviour Pin
sinosoidal21-Mar-07 6:17
sinosoidal21-Mar-07 6:17 
AnswerRe: Strange behaviour Pin
Stefan Troschuetz21-Mar-07 6:49
Stefan Troschuetz21-Mar-07 6:49 
GeneralRe: Strange behaviour Pin
sinosoidal21-Mar-07 6:50
sinosoidal21-Mar-07 6:50 
GeneralRe: Strange behaviour Pin
sinosoidal21-Mar-07 6:53
sinosoidal21-Mar-07 6:53 
GeneralRe: Strange behaviour Pin
Stefan Troschuetz21-Mar-07 6:58
Stefan Troschuetz21-Mar-07 6:58 
GeneralRe: Strange behaviour Pin
sinosoidal21-Mar-07 7:39
sinosoidal21-Mar-07 7:39 
AnswerRe: Strange behaviour Pin
Edmundisme21-Mar-07 7:05
Edmundisme21-Mar-07 7:05 
It's not clear to me from your post what behavior you're seeing with this. However, if I understand you correctly, you want a vertical splitter that contains a horizontal splitter in one of its two panels. In order to accomplish this, you need to add the horizontal splitter to the controls collection of the panel you want the horizontal splitter to be contained by. In the above code, whenever you call addNewRegion a new splitter is created and it is added to the form's controls collection. This won't work.

Also, it seems you are over complicated the problem. If you are setting the Dock property of the splitter to DockStyle.Fill, then the control will automatically fill the bounds of the form. So you don't need to set the location or the size.

I would try the following and massage it as needed:

// create the vertical splitter
SplitContainer verticalSplitter = new SplitContainer();
verticalSplitter.Orientation = Orientation.Vertical;
verticalSplitter.Dock = DockStyle.Fill;

// create the horizontal splitter
SplitContainer horizontalSplitter = new SplitContainer();
horizontalSplitter.Orientation = Orientation.Horizontal;
horizontalSplitter.Dock = DockStyle.Fill;

// add the vertical splitter to the form
this.Controls.Add(verticalSplitter);

// add the horizontal splitter to the first panel of the vertical splitter
verticalSplitter.Panel1.Controls.Add(horizontalSplitter);

...

Hope this helps.
GeneralRe: Strange behaviour Pin
sinosoidal21-Mar-07 7:33
sinosoidal21-Mar-07 7:33 
GeneralRe: Strange behaviour Pin
Edmundisme21-Mar-07 7:42
Edmundisme21-Mar-07 7:42 
GeneralRe: Strange behaviour Pin
sinosoidal21-Mar-07 7:51
sinosoidal21-Mar-07 7:51 
GeneralRe: Strange behaviour Pin
Edmundisme21-Mar-07 8:23
Edmundisme21-Mar-07 8:23 
GeneralRe: Strange behaviour Pin
sinosoidal22-Mar-07 0:13
sinosoidal22-Mar-07 0:13 
GeneralRe: Strange behaviour Pin
sinosoidal22-Mar-07 0:45
sinosoidal22-Mar-07 0:45 
GeneralRe: Strange behaviour Pin
Edmundisme22-Mar-07 6:07
Edmundisme22-Mar-07 6:07 
GeneralRe: Strange behaviour Pin
sinosoidal22-Mar-07 6:28
sinosoidal22-Mar-07 6:28 
AnswerRe: Strange behaviour Pin
Edmundisme21-Mar-07 7:10
Edmundisme21-Mar-07 7:10 
AnswerRe: Strange behaviour Pin
Muammar©21-Mar-07 8:22
Muammar©21-Mar-07 8:22 
QuestionDatabase to Dataset to DataTable then Another table using query Pin
Sarfaraj Ahmed21-Mar-07 6:12
Sarfaraj Ahmed21-Mar-07 6:12 
Questiontwo problems in windows form Pin
ahmad al-omar21-Mar-07 5:59
ahmad al-omar21-Mar-07 5:59 
AnswerRe: two problems in windows form Pin
Shy Agam21-Mar-07 7:42
Shy Agam21-Mar-07 7:42 
GeneralRe: two problems in windows form Pin
ahmad al-omar21-Mar-07 8:51
ahmad al-omar21-Mar-07 8:51 
GeneralRe: two problems in windows form Pin
Shy Agam21-Mar-07 9:36
Shy Agam21-Mar-07 9:36 
GeneralRe: two problems in windows form Pin
Sautin.net22-Mar-07 8:49
Sautin.net22-Mar-07 8:49 
QuestionPHP IDE Pin
abalfazl21-Mar-07 4:25
abalfazl21-Mar-07 4:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.