Splitter in C#……………….

It is placed after/before control. At run time if u keep mouse control at edge of control a small arrow appears using it you can increase/decrease size of the control. (Control which has expandability).

Procedure :

1)    Increase the form size to maximum, take treeview control, set its dock property to left.

2)    Take splitter

3)    Take listview control, increase the size according to form.

 

int a, b, c, d;

private void Form6_Load(object sender, EventArgs e)

{

a = treeView1.Width;

b = listView1.Left;

}

private void splitter1_SplitterMoved(object sender, SplitterEventArgs e)

{

c = treeView1.Width;

d = c – a;

listView1.Left = b + d;

listView1.Width = this.Width – listView1.Left;

}

SHARE THE KNOWLEDGE


  

Advertisements

About Dinesh

I am engineering student........ I am selected in Microsoft Student Partner as MSP............

Posted on February 28, 2012, in C#, Knowledge, Language. Bookmark the permalink. Leave a comment.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: