orbs Posted December 5, 2012 Share Posted December 5, 2012 (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 December 5, 2012 by orbs Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now