INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Help needed for button skinning  (Read 1811 times)

bugmenot

  • Recent member
  • *
  • Posts: 33
Help needed for button skinning
« on: November 27, 2008, 09:57:22 pm »

Hi,

I used the template for Visual studio 2005 in C# to build an interface plugin. Unfortunatly the buttons do not skin themself based on the skin applyed in MC.

This is what I have :
http://screencast.com/t/71OmxFwoo


This is what I am trying to achieve:
http://screencast.com/t/dtyvch9kl2G


There is basic skinning behavior in the template for the background and foreground color of controls, but I think button don'T have any forground and background color. Heres is a snippet :

Code: [Select]
// Setting the Fore- and Backcolors of all Controls (if different)
private void setAllColors(Control control)
{
while (control != null)
{
setBackColor(control, getColor("Tree", "BackColor"));
setForeColor(control, getColor("Tree", "TextColor"));
control = mainPanel.GetNextControl(control, true);
}
}

Any help to achieve a skinned button will be gladly appreciated

Thx
Logged

bugmenot

  • Recent member
  • *
  • Posts: 33
Re: Help needed for button skinning
« Reply #1 on: December 02, 2008, 01:33:28 pm »

Still in top of thread so useless to bump to top, but still no answers yet. Any dev on MC could help on this and http://yabb.jriver.com/interact/index.php?topic=49412.0 ? Community seem to have no answer for me.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42441
  • Shoes gone again!
Re: Help needed for button skinning
« Reply #2 on: December 02, 2008, 01:37:45 pm »

.NET buttons are owner-draw (meaning .NET skins them), so our skinning engine leaves them alone.

You would have to use a standard Windows button (not owner draw) to get it to skin.
Logged
Matt Ashland, JRiver Media Center

bugmenot

  • Recent member
  • *
  • Posts: 33
Re: Help needed for button skinning
« Reply #3 on: December 06, 2008, 03:53:36 pm »

From an answer I got on Stackoverflow

Quote
The controls in Windows.Forms are not owner-drawn, but rather system-drawn.

Note that when I set the button to flat style, I get the right background color and text color, but button doesn't have the rounded corner and their is no hover effect on those. As I write those line it's the best I was able to achieve.
Logged
Pages: [1]   Go Up