Jump to content

ugh.. gui images are annoying


Nakuribon
 Share

Recommended Posts

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
Link to comment
Share on other sites

  • Developers

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 etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

#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
Link to comment
Share on other sites

  • Developers

#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 etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...