Image: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
Line 16: Line 16:
{| class="wikitable"
{| class="wikitable"
|-
|-
| src || The name of the file. For example, mario.jpg. The file should be in the current folder. At runtime, use Image1.firstChild.src=”a.jpg”
| src || The name of the file. For example, mario.jpg. The file should be in the current folder. At runtime, use  
<pre>Image1.firstChild.src=”a.jpg”<pre>
|}
|}



Revision as of 15:10, 15 May 2013

Description

The Image control is used to display an image. The image can be any common format, including jpg, bmp, gif or png. The image is scaled to fit the bounds.

To add an image to your app, choose the Image icon in the Toolbar, then position it on the Design Screen. Use the Property Editor to set the properties you need, then add functions to your code to respond to the events that come from the button: usually, just onclick.

Images should be in your project folder or a subfolder.

For more control of images at runtime, use the PictureBox control.

Properties

Standard properties are supported, plus:

src The name of the file. For example, mario.jpg. The file should be in the current folder. At runtime, use
Image1.firstChild.src=”a.jpg”<pre>
|}

== Events ==

Standard [[events|events]] are supported. 

== Example ==

<pre>
Rem Image Example
Function Image1_onmouseover()
  Msgbox "Over!"
End Function

Output

Related Items

PictureBox