Home » U++ TheIDE » U++ TheIDE: Layout (Forms) Designer » How to Change Button background image, and mouse over image
|
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 |
|
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
|
|
|
Goto Forum:
Current Time: Tue Mar 19 07:17:34 CET 2024
Total time taken to generate the page: 0.00964 seconds
|