Jump to content

Icons, buttons, and sizing, oh my!

Recommended Posts

Ooooooooooooook.... well, I searched, but found nothing. I've seen plenty of examples of icons on buttons, but when I try it, the size it all wrong! The icon is 16x15px and the button is 25x25px... should work right? I added the $BS_ICON as the style and then used GUICtrlsetImage($ButtonName, "image.ico") to put the image there, but the image is HUGE! I have to make the button 50x50 to view it all! This doesn't happen when I use a bitmap, but then I don't get transparency. I even pasted some working code DIRECTLY into my program, and STILL got this... I tried working icons too. Any help?

Link to comment
Share on other sites

I'm not positive but I'm fairly shure that icons and buttons that are icons can only be one of two sizes, small or normal, this is set by icontype, the 4th variable of GUIctrlSetImage, see the help file.

A possible work around for transparancy:

To have a transparent picture it is needed to use a .gif image with the transparency color set and to create the window with WS_EX_LAYERED extended style.

(quoted from GUIctrlCreatePic)

I suspect that these work by the same basic methods, so setting you window to have WS_EX_LAYERED, and setting the button image for $BS_BITMAP and using a .gif instead of a bitmap will work. It's at least worth a shot.


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

  • Recently Browsing   0 members

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