Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change BackColor of splitter when moving

Status
Not open for further replies.

hh2424

Programmer
Feb 18, 2003
37
US
I'm trying to change the splitter's backColor when user move it. and I have the following:

private void splitter1_SplitterMoving(object sender, System.Windows.Forms.SplitterEventArgs e)
{
this.splitter1.BackColor = System.Drawing.Color.Red;
}

However, the color doesn't change at all when this event fires. Is there something else I need to set for this to happen?

thanks

 
are you sure this event is firing as you planned? i've not used it, but i would try sticking a messagebox in there to test it.
 
Yes, I'm sure the event is being fired. It seems that when I select the splitter, it changed to the default select color and I didn't see a property for this.
 
no, it doesn't look like there is one. i would use the paint event if i were you, and draw over it as you please. it's a bit more work, but look at it like this - you can do a lot more to personalise it than just change the colour.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top