473,396 Members | 1,671 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How can I splite the form into four parts?

How can I splite the form into four parts?

I have already tryed to use the Splitter Component,but it doesn't works.
Nov 16 '05 #1
2 1176
I think what you want to do is add 4 (3 would also work) panels to your Form
(Splitters would be optional) and set the Dock property of each panel
accordingly.

About the Dock Property
http://msdn.microsoft.com/library/de...sDockTopic.asp

"honeybee" <zh***********@sina.com> wrote in message
news:uh**************@TK2MSFTNGP09.phx.gbl...
How can I splite the form into four parts?

I have already tryed to use the Splitter Component,but it doesn't works.

Nov 16 '05 #2

"Andy Gaskell" <pubb AT hotmail DOT com> a écrit dans le message de
news:ub**************@TK2MSFTNGP09.phx.gbl...
I think what you want to do is add 4 (3 would also work) panels to your Form (Splitters would be optional) and set the Dock property of each panel
accordingly.


I have tried this, and it doesn't works :o(

So, you have to do it by hand :

private void resize(object sender, EventArgs e)

{

/***********

* LT * RT *

***********

* LB * RB *

**********/

int x = myPanel.ClientSize.Width;

int y = myPanel.ClientSize.Height;

int xT = x / 2;

int xB = x / 2;

int yL = y * 5 / 12 - minDistY * 2 / 3;

int yR = y * 5 / 12 - minDistY * 2 / 3;

LTpanel.Location = new Point(0, 0);

LTpanel.Width = xT;

LTpanel.Height = yL;

LTpanel.Anchor = AnchorStyles.Left | AnchorStyles.Top;

RTpanel.Location = new Point(xT, 0);

RTpanel.Width = x - xT;

RTpanel.Height = yR;

RTpanel.Anchor = AnchorStyles.Right | AnchorStyles.Top;

LBpanel.Location = new Point(0, yL);

LBpanel.Width = xB;

LBpanel.Height = y - yL;

LBpanel.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;

RBpanel.Location = new Point(xB, yR);

RBpanel.Width = x - xB;

RBpanel.Height = y - yR;

RBpanel.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;

}

Perhaps it is not the better way, but at least it works :o)

(Note : don't forget the myPanel.Resize += new EventHandler(resize); )

HTH
Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Randell D. | last post by:
Folks, I have a form called "ourTestForm". Its a test form - nothing special - it contains five input tags - they are named one, two, three, four and five. The input tags are of type...
2
by: harvie wang | last post by:
I want to create a splite window in c# like MFC CSplitterWnd thanks!
5
by: Kevin Newman | last post by:
Does anyone know of any application (AJAX or other) that will display the appropriate address for for the selected (or detected) country? If not, does anyone know where I can find a list or...
5
by: timothy.pollard | last post by:
Hi I'm having a bit of bother trying to make a questionnaire do what I want it to. I have put it up on www.web-iq.co.uk/test.htm. Basically the user of the final form (when I've tarted it up)...
1
by: NumberCruncher | last post by:
Hi All, I am struggling with setting up my first system of tables, forms,and reports, and could use your help! I am setting up a database to keep track of the production of a produced item. The...
3
by: msg2ajay | last post by:
hi, I am not able to align the textfield to the top of the frame one bye one. The problem is it is showing where it is hiding..... so is it possible to allign the text field to the top of...
9
by: phopman | last post by:
Hello! I am currently working on a project. And have been assigned to get up to speed quickly on php. And even though I love the language, it's not easy to get up to speed in like 2 seconds :-) ...
6
by: Thom Little | last post by:
Using C# 3.5 I have a form that calls many other sub-forms. Typically there will be five forms open at the same time. If the main form is closed all the sub forms are also closed. Is there...
58
by: bonneylake | last post by:
Hey Everyone, Well recently i been inserting multiple fields for a section in my form called "serial". Well now i am trying to insert multiple fields for the not only the serial section but also...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.