Click here to Skip to main content
15,909,897 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to get the count of lines in .txt file Pin
Edmundisme21-Mar-07 9:44
Edmundisme21-Mar-07 9:44 
AnswerRe: How to get the count of lines in .txt file Pin
Dave Kreskowiak21-Mar-07 8:47
mveDave Kreskowiak21-Mar-07 8:47 
AnswerRe: How to get the count of lines in .txt file Pin
sherifffruitfly21-Mar-07 18:17
sherifffruitfly21-Mar-07 18:17 
Questionrecieving output from dos Pin
sharpiesharpie21-Mar-07 6:27
sharpiesharpie21-Mar-07 6:27 
AnswerRe: recieving output from dos Pin
szukuro21-Mar-07 6:36
szukuro21-Mar-07 6:36 
AnswerRe: recieving output from dos Pin
Dan Neely21-Mar-07 6:51
Dan Neely21-Mar-07 6:51 
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 
Hi,

I need to build a complex region dividing system.

For example, i want to divide the display in two and then divide one of those sub displays in two again, etc.

For that i'm using the split container.

Basicly i need to dynamicly create split containers.

In the end i need to output a xml file with the regions sizes.

Well, i'm in the beggining of this problem.

For now i have two buttons. One that creates a horizontal split and another a vertical split.

For that i invocate the following method, changing only the orientation:

<br />
private void addNewRegion(System.Windows.Forms.Orientation o)<br />
        {<br />
            <br />
            SplitContainer region = new SplitContainer();<br />
            region.SuspendLayout();<br />
            this.SuspendLayout();<br />
<br />
            region.Dock = System.Windows.Forms.DockStyle.Fill;<br />
            region.Location = new System.Drawing.Point(0, 0);<br />
            region.Name = "region";<br />
            region.Size = new System.Drawing.Size(292, 266);<br />
            region.SplitterDistance = Int32.Parse(p.width)/2;<br />
            region.TabIndex = 0;<br />
            region.Orientation = o;<br />
<br />
            this.Controls.Add(region);<br />
            region.ResumeLayout(false);<br />
            this.ResumeLayout(false);<br />
        }<br />


Following the process described above it doesnt work. However if i past the body of the addNewRegion into the Form1_load, the split container is create.

Can anyone explain me why this doesnt work?

Maybe i need to redesign the form. Maybe not.

Any ideas?

Thx,

Nuno
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 
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 

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.