Jump to content
Sign in to follow this  
Nakuribon

ugh.. gui images are annoying

Recommended Posts

Nakuribon

hey guys, i make a GUICtrlCreatePic("", 10, 10, 0, 0) set to $pic1 in the beginning of the script, and then I have a button that opens an open file dialog, and I set that to $addimgfile and then use GUICtrlSetImage($pic1, $addimgfile) but the image does not change... anyone know why? thanx!

~naku


i own this sig... php rulezlinks:My PSP Web Portal

Share this post


Link to post
Share on other sites
Jos

hey guys, i make a GUICtrlCreatePic("", 10, 10, 0, 0) set to $pic1 in the beginning of the script, and then I have a button that opens an open file dialog, and I set that to $addimgfile and then use GUICtrlSetImage($pic1, $addimgfile) but the image does not change... anyone know why? thanx!

~naku

<{POST_SNAPBACK}>

maybe you can show the portion of the script that doesn't work or shows your issue ? Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Nakuribon

#include <GUIConstants.au3>
[...]
$pic = GUICtrlCreatePic("", 10, 10, 0, 0)
GUISetState(@SW_SHOW)
While 1
[...]
   Case $msg[1] = $maindialog and $msg[0] = $addimgbtn
      $imgfile = FileOpenDialog("Choose a picture", "", "Images (*.jpg;*.bmp;*.png;*.gif)", 1)
      GUICtrlSetImage($pic, $imgfile)
[...]
WEnd

Edited by Nakuribon

i own this sig... php rulezlinks:My PSP Web Portal

Share this post


Link to post
Share on other sites
Jos

#include <GUIConstants.au3>
[...]
$pic = GUICtrlCreatePic("", 10, 10, 0, 0)
GUISetState(@SW_SHOW)
While 1
[...]
   Case $msg[1] = $maindialog and $msg[0] = $addimgbtn
      $imgfile = FileOpenDialog("Choose a picture", "", "Images (*.jpg;*.bmp;*.png;*.gif)", 1)
      GUICtrlSetImage($pic, $imgfile)
[...]
WEnd

<{POST_SNAPBACK}>

GUICtrlCreatePic("", 10, 10, 0, 0)

Returns a -1 so looks like it cannot handle a "" as filename.

Set it to a valid filename and try it again.


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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  

×