AndreiCibo
Member
Hello. I am trying to use the .SetImage function of an ImageView, but I haven't understood the syntax related here (https://www.b4x.com/b4j/help/jfx.html#imageview_setimage). Can someone give me a working example?
Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Dim imv As ImageView
Dim cirese, pere As Image
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("Ly1") 'Load the layout file.
MainForm.Show
imv.Initialize("imv")
pere.Initialize("E:\_AndreiINFO\B4J\Projects\Memory\Files", "pere.png")
cirese.Initialize("E:\_AndreiINFO\B4J\Projects\Memory\Files", "cirese.jpg")
imv.SetImage(cirese)
End Sub
'Return true to allow the default exceptions handler to handle the uncaught exception.
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
Return True
End Sub
Sub b2_MouseClicked (EventData As MouseEvent)
imv.GetImage(pere)
End Sub
Sub b1_MouseClicked (EventData As MouseEvent)
imv.GetImage(cirese)
End Sub