Modify

Opened 5 years ago

Last modified 5 years ago

#2815 new Bug

GUICtrlSetImage resets the icon size

Reported by: Tweaky Owned by:
Milestone: Component: AutoIt
Version: 3.3.12.0 Severity: None
Keywords: Cc:

Description

GUICtrlSetImage resets the icon size.

I think GUICtrlSetImage should be the size actually kept as it was set by GUICtrlCreateIcon

#Region    ;************ Includes ************
#include <GUIConstantsEx.au3>
#EndRegion    ;************ Includes ************

GUICreate("My GUI group", 300, 300)

Global $hIcon1 = GUICtrlCreateIcon("shell32.dll", -5, 20, 20, 240, 240)


GUISetState(@SW_SHOW) ; will display an empty dialog box

Sleep(2000)
GUICtrlSetImage($hIcon1, "shell32.dll", -6)

; Loop until the user exits.
While 1
	Switch GUIGetMsg()
		Case $GUI_EVENT_CLOSE
			ExitLoop
	EndSwitch
WEnd

In 3.3.8.1 that works well.
In 3.3.10.2 and later it does not work

Attachments (0)

Change History (1)

comment:1 Changed 5 years ago by Jpm

In fact GUICtrlSetImage is supposed to use the icontype parameter
so 16x16 or 32x32 for normal.
What can be wrong is the GUICreateIcon which does not follow the selection of iconsize.

You can argue that greater iconsize have appeared which cannot be selected but that a very old code that have not be adaptated.

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as new The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.