Camera: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
(Created page with "file:camera.png == Description == The YouTube control lets you embed YouTube videos in your app. All the settings needed to display a video can be set at design time in ...")
 
No edit summary
Line 3: Line 3:
== Description ==
== Description ==


The YouTube control lets you embed YouTube videos in your app. All the settings needed to display a video can be set at design time in AppStudio: no additional code needs to be written.
The Camera control lets you take pictures using your device's camera and display them in a PictureBox. The contents of that PictureBox can be saved in a database or sent to a server. All the settings needed to take a picture can be set at design time in AppStudio: no additional code needs to be written.


If you do want to change any settings at runtime, you can do so. Use the .refresh() method to redisplay the video with your new settings.
The Cameral control has the same properties as a Button, with one addition, the picturebox  property.
== Properties and Methods ==


== Properties ==
Standard [[properties and methods|properties]] are supported, plus:
 
{| class="wikitable"
{| class = "wikitable"
|-
| videoID || YouTube Video ID
|-
| playlist || Comma separated list of video IDs to play.
|-
| autoplay || Start playing right away?
|-
| autohide || Autohide controls?
|-
| controls || Show player controls?
|-
| modestbranding || Show YouTube logo?
|-
|-
| playsinline || Fullscreen playback on iOS?
| corners || round or square. jQuery Mobile only.
|-
|-
| rel || Show related videos when done?
| icon || Set to false for no icon. You have a choice of 18 standard icons otherwise.
|-
|-
| ratio || Aspect ratio: 16x9 or 4x3
| iconPos || Position of the icon. Can be none, left, right, top, bottom or notext.
|-
|-
| showinfo || Show info about the video?
| image || Path to image to show instead of title on the button.
|-
|-
| start || Second to start at
| mini || true/false. For jQuery Mobile, should the text be normal size or mini size?
|-
|-
| theme || Display theme: dark or light
| picturebox || The ID of the PictureBox control on the form to put the picture into.
|-
|-
| width || Height is calculated from this value.
| value || The title of the button. Design time or runtime.
|}
|}


Line 44: Line 32:
== Example ==
== Example ==


This code lets the user enter a Video ID at runtime. It also resizes based on screen size.
No code needed - it just works!
<pre>
Sub Main()
  txtVideoID.text=YouTube1.settings.videoID
End Sub


Function btnRefresh_onclick()
  YouTube1.settings.videoID = txtVideoID.text
  YouTube1.settings.width = Form1.Width-20
  YouTube1.refresh()
End Function
</pre>
</pre>



Revision as of 13:19, 16 April 2014

Description

The Camera control lets you take pictures using your device's camera and display them in a PictureBox. The contents of that PictureBox can be saved in a database or sent to a server. All the settings needed to take a picture can be set at design time in AppStudio: no additional code needs to be written.

The Cameral control has the same properties as a Button, with one addition, the picturebox property.

Properties and Methods

Standard properties are supported, plus:

corners round or square. jQuery Mobile only.
icon Set to false for no icon. You have a choice of 18 standard icons otherwise.
iconPos Position of the icon. Can be none, left, right, top, bottom or notext.
image Path to image to show instead of title on the button.
mini true/false. For jQuery Mobile, should the text be normal size or mini size?
picturebox The ID of the PictureBox control on the form to put the picture into.
value The title of the button. Design time or runtime.

Events

Events are handled by the control itself.

Example

No code needed - it just works!

Output

Related Items