[Gambas-user] How to change a picture when a key is pressed ?
charlesg
charles at ...1784...
Fri Jan 8 10:21:00 CET 2010
Hi
I don't mess around with pictures much so this may be the blind leading the
blind.
The command is: PictureBox1.Picture =
Picture.Load("/home/charles/Photos/SV400005.JPG")
I could not get a response to a PictureBox1_keypress event so I buried a
textbox behind the picturebox, made sure it had focus and:
> PUBLIC SUB TextBox1_KeyPress()
> IF Key.text = "a" THEN
> PictureBox1.Picture =
> Picture.Load("/home/charles/Photos/SV400005.JPG")
> ENDIF
> END
>
Remember that Key.text is case sensitive so you should test for that.
rgds
--
View this message in context: http://old.nabble.com/How-to-change-a-picture-when-a-key-is-pressed---tp27065827p27073271.html
Sent from the gambas-user mailing list archive at Nabble.com.
More information about the User
mailing list