Jump to content

_ButtonHover() UDF


Valuater
 Share

Recommended Posts

  • Replies 68
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Why do you have an extra parameter in your code above?

The 'tag' parameter is prepended to the name of the button image. All images must be in the same directory. So for two styles...

$Button1 = __HoverButton("text", "left", "top", "width", "height", "style1_", "color")
$Button2 = __HoverButton("text", "left", "top", "width", "height", "style2_", "color")

Then you must have images in your skin directory -

style1_Normal.bmp, style1_Over.bmp, style1_Pressed.bmp
style2_Normal.bmp, style2_Over.bmp, style2_Pressed.bmp
Link to comment
Share on other sites

  • 4 years later...

Interesting small function.
In my poor opinion, _HoverButton function should return the array with both controls instead of returning only the control id of the pic so both controls can be used since there is a label and a pic.
This way you can get the text of the "button", modify it and many more things.

I also removed the _CheckHoverAndPressed in the while loop and made it work similarly with less cpu usage.

Thanks for the function.

 

Link to comment
Share on other sites

  • 3 years later...

Hi Valuater,

First of all thanks for theses nices UDFs.

I have an issue c oncerning the __ButtonHoverTag.au3 one. 

When I use it, when I click on a button, the associated "click on" event is not executed both on "OnEvent" Mode or "Classic" mode. The __HoverButton function doesn't seem to return a value?

Thanks in advance for any help

SLA5.au3

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...