Sign in to follow this  
Followers 0
orbs

bug? icon resize on checkbox with pushlike style

1 post in this topic

#1 ·  Posted (edited)

hello,

I'm trying to create a button and a pushlike checkbox with icons on them. the problem is that on the checkbox, the icon is resized to a smaller size, while on the button the same icon appears as expected in its native size.

I tried with button & checkbox size of 50x50, with icon size 48x48. you can run the attached script and see the result (place the attached icon file in the same folder as the attached script).

at first it was 2 different icons, so I checked with other icons, switched between them, etc. - the conclusion is that the icon is not the problem, the problem exists on a pushlike checkbox and not on a button.

the problem exists on Windows XP & Windows 7, with native and with classic graphic theme.

am I doing something wrong? how can this problem be solved?

thanks in advance,

Or

EDIT: I tried now with various sizes of icons: 16,24,32. it seems that on the checkbox, the icon is always resized to 32x32, while on the button, the icon keeps its native size.

#include <GUIConstantsEx.au3>

#include <ButtonConstants.au3>

Global $msg

GUICreate("GUI",130,80)

GUICtrlCreateButton('',10,20,50,50,$BS_ICON)
GUICtrlSetImage(-1, 'icon_48_Alpha.ico')

GUICtrlCreateCheckbox('',70,20,50,50,BitOR($BS_AUTOCHECKBOX,$BS_PUSHLIKE,$BS_ICON))
GUICtrlSetImage(-1, 'icon_48_Alpha.ico')

GUISetState()

While $msg<>$GUI_EVENT_CLOSE
$msg = GUIGetMsg()
WEnd

icon_48_Alpha.ico

PushlikeIcon.au3

Edited by orbs

Share this post


Link to post
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
Sign in to follow this  
Followers 0