Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Layout (Forms) Designer » How to Change Button background image, and mouse over image
icon5.gif  How to Change Button background image, and mouse over image [message #32944] Thu, 23 June 2011 15:13 Go to next message
silverx is currently offline  silverx
Messages: 62
Registered: March 2011
Member
I have created a top window with a button on it, and have even assigned it an image that doesn't cover the whole button, and it still has like a default background image that is 2 colors of gray, and then when I do the mouse over it those colors change from gray to 2 shades of blue.

I don't want it for every button on the window, just 1 of them.

I have looked all over and still can't disable it for a given button.

Is their an easy way to change it to just be transparent background all of the time, and not change when the mouse is over it?

Also on similar subject, any way to change the mouse pointer from an arrow to something else? Maybe when it is over the button?

Re: How to Change Button background image, and mouse over image [message #33078 is a reply to message #32944] Wed, 06 July 2011 00:57 Go to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

silverx wrote on Thu, 23 June 2011 15:13

I have created a top window with a button on it, and have even assigned it an image that doesn't cover the whole button, and it still has like a default background image that is 2 colors of gray, and then when I do the mouse over it those colors change from gray to 2 shades of blue.

I don't want it for every button on the window, just 1 of them.

I have looked all over and still can't disable it for a given button.

Is their an easy way to change it to just be transparent background all of the time, and not change when the mouse is over it?

There is a SetStyle() functions, which allows you to change the visual appearance of given control. It usually consist of couple of images that are used for different states (usually plain, mouse over, clicked and disabled). You can get the defaults by calling DefaultStyle() and just alter it, or you can create a new style from scratch.

silverx wrote on Thu, 23 June 2011 15:13

Also on similar subject, any way to change the mouse pointer from an arrow to something else? Maybe when it is over the button?

Yes, there are ways. If you are writing your own Ctrl derived widget, you can simply override CursorImage() function. For other cases you can use a static function Ctrl::OverrideCursor(), but you have to be careful, to restore the image back to its original state afterwards. Note that the first option (derive your own Ctrl) is recommended and it is usually simpler (just override CursorImage()...).

Best regards,
Honza
Previous Topic: Why Size difference on top window and button?
Next Topic: tab inside tab..invoked through a buttton
Goto Forum:
  


Current Time: Wed Jun 12 22:40:08 CEST 2024

Total time taken to generate the page: 0.01925 seconds