SplitContainer splitter in C#?
Asked Answered
B

3

5

i am using a split container. For some reason, the splitter looks like this: enter image description here

It is very hard to see. It is the faint 2 lines in the middle of the two black lines. How do i fix this issue and add a filling between the two lines? I am using Fixed Single as my border style.

Brewing answered 17/7, 2012 at 19:58 Comment(5)
that changes the whole border, i only need the splitter changedBrewing
Then change the color of the splitter and not the border.Joijoice
Have you tried msdn.microsoft.com/en-us/library/…?Asternal
Ok, i am using a split container control...the splitter is a part of the controlBrewing
@Asternal yes, that is why there is space in between the two lines..i tried that, but it did not workBrewing
R
7

Try changing the backcolor, but if using the designer, then also go into Panel1 and Panel2 and change those respective backcolors to the colors you want.

Also, their is a SplitterWidth property that can adjust the overall size of the splitter handle.

Ruthy answered 17/7, 2012 at 20:2 Comment(3)
thanks, all i had to do was change the back colors of the panels and set a different color in the splitter background...Brewing
Also, why when i click on it to move, it does not move in real time...it does not move until you release the left click???Brewing
@EliteGamer That's just the way the split container works. You should see a dithered bar moving with the cursor, but other than that, once you mouse up and let go, then the sub panels will resize themselves.Ruthy
N
1

Verify that the split container's anchors are set properly.

Numerable answered 17/7, 2012 at 20:1 Comment(0)
J
1

Use backcolor to change the color.

http://msdn.microsoft.com/en-us/library/system.windows.forms.control.backcolor.aspx

Joijoice answered 17/7, 2012 at 20:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.