Hallo,
ich hab ein Problem.
Mein Problem ist, wenn ich mit GUICtrlSetImage ein Pfad von Dateien wie .exe angebe werden die Icons auf die Butten gesetzt. Jedoch bei Bildern nicht.
Ich will, wenn ich ein Bild wähle z. B. .jpg soll es diesen JPG als Bild zeigen.
Ich programmiere zuzeit sowas wie Shortcuts.
[autoit]
local $ShortcutPath = $Shortcuts[$ValueRow][1]
if not FileExists($ShortcutPath) then ContinueLoop
[/autoit][autoit][/autoit][autoit]local $Width = 60, $Height = 60
local $GUI_BUTTON_ID = GUICtrlCreateButton($ShortcutPath, mod($ValueRow - 1, 4) * $Width, int(($ValueRow - 1)/ 4) * $Height, $Width, $Height)
local $Ret = GUICtrlSetImage($GUI_BUTTON_ID, $ShortcutPath, 0, 1)
;~ if $Ret == 0 Then
;~ $Ret = GUICtrlSetImage($GUI_BUTTON_ID, $ShortcutPath)
;~ EndIf
ConsoleWrite($Ret & " " & $ShortcutPath & " " & $GUI_BUTTON_ID & @CRLF)
[/autoit][autoit][/autoit][autoit]if not $Buttons_Info[$GUI_BUTTON_ID] Then
$Buttons_Info[$GUI_BUTTON_ID] = $ShortcutPath
EndIf