Jump to content

Flicker-free PNG-based buttons


Lucid
 Share

Recommended Posts

First off, I still learning Autoit, and so hopefully this hasn't been answered before on the forum and I just overlooked it...

I've been testing/tinkering/researching and can't seem to code what I want. So I'm hoping that someone here can lend me a hand.

I'm trying to come up with a 3-stage, flicker-free, .PNG-based button.

I'm also looking for this method to let me tab between one of these buttons and other input fields on the same GUI. Essentially I'm wanting to have a button that shows the typical states (normal, hover, pressed) without flickering. And of course, so I can have multiple buttons on the same GUI too.

Has anyone gotten this type of thing to work consistently and care to share some code?

I should mention that I did get something to work, but it seems kind of overkill and clunky (it uses child GUIs as buttons). So I'm hoping one of you Autoit gurus have a better, sleeker, solution I can take advantage of.

Thanks!

post-83881-0-82508900-1427209746.png

post-83881-0-34130700-1427209747.png

post-83881-0-54344700-1427209747.png

Link to comment
Share on other sites

  • 2 weeks later...

Thanks for that pointer. I've been tinkering with the example code (the "Buttons -+ Example.au3" script looked to be the closest to what I needed), but can't seem to get it to work with the transparency in a PNG.

Since the code looks to convert the PNG to a bitmap using GDI+, I loose the "glow" around a button (in the files I attached in my first post, the blue glow outside the solid button area doesn't show up as expected).

Any pointers on what I need to dig into?

Thanks!

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

×
×
  • Create New...