<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.appstudio.dev/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Lpeaker</id>
	<title>NSB App Studio - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.appstudio.dev/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Lpeaker"/>
	<link rel="alternate" type="text/html" href="https://wiki.appstudio.dev/Special:Contributions/Lpeaker"/>
	<updated>2026-12-01T11:11:42Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.46.3</generator>
	<entry>
		<id>https://wiki.appstudio.dev/index.php?title=IOS7&amp;diff=4022</id>
		<title>IOS7</title>
		<link rel="alternate" type="text/html" href="https://wiki.appstudio.dev/index.php?title=IOS7&amp;diff=4022"/>
		<updated>2013-09-26T00:33:31Z</updated>

		<summary type="html">&lt;p&gt;Lpeaker: /* Known Bugs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page keeps track of information about iOS7 for AppStudio users. Feel free to add your tricks and workarounds!&lt;br /&gt;
&lt;br /&gt;
Max Firtman has a general overview [http://www.mobilexweb.com/blog/safari-ios7-html5-problems-apis-review here].&lt;br /&gt;
&lt;br /&gt;
== New Features ==&lt;br /&gt;
# New style: default font style is Helvetica Neue. Since it is a bit finer than regular Helvetica, consider moving up the font size. To look even more like iOS7, get rid of the striped background and use blue labels. Here&#039;s a good [http://ivomynttinen.com/blog/the-ios-7-design-cheat-sheet/ cheat sheet] on some of the design differences.&lt;br /&gt;
[[File:Ios7.1.png|center]]&lt;br /&gt;
# New Date inputType on TextBox control.&lt;br /&gt;
# New Time  inputType on TextBox control.&lt;br /&gt;
# New Progress Control[[File:ProgressBar.png|center]]&lt;br /&gt;
# Text to Speech&lt;br /&gt;
&lt;br /&gt;
== Known Bugs ==&lt;br /&gt;
# mailto:, tel:, sms: etc. tags do not work when saved to Home Screen.&lt;br /&gt;
# Simple MsgBox does not work properly. Use NSB.MsgBox instead&lt;br /&gt;
# JavaScript alert, confirm and prompt do not work.&lt;br /&gt;
# StatusBar overlaps the top of the app. The workaround is to not use the top 20 pixels of the screen.&lt;br /&gt;
[[File:IOS7statusbar.png|center|320px]]&lt;br /&gt;
# There is a problem with SQLite databases that are over 5 megs.&lt;br /&gt;
# In Safari preferences, &amp;quot;Block Cookies&amp;quot; needs to be set to &amp;quot;Never&amp;quot; or &amp;quot;No Third Party&amp;quot;. It cannot be &amp;quot;Always&amp;quot;. Otherwise, localStorage and SQLite statements will not work.&lt;br /&gt;
#The NSB property ‘status bar’, it  effects IOS 7.0 Status Bar in this way:&lt;br /&gt;
&lt;br /&gt;
     1.	Set to black-translucent = black translucent&lt;br /&gt;
     2.	Set to black = white translucent&lt;br /&gt;
     3.  Set to default  = black translucent&lt;br /&gt;
&lt;br /&gt;
== Testing if iOS 7 is running ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
If InStr(navigator.appVersion,&amp;quot;iPhone OS 7_0&amp;quot;) &amp;gt;0 Then &lt;br /&gt;
  Print &amp;quot;iOS7&amp;quot;&lt;br /&gt;
Else&lt;br /&gt;
  Print &amp;quot;not iOS7&amp;quot;&lt;br /&gt;
End If&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lpeaker</name></author>
	</entry>
	<entry>
		<id>https://wiki.appstudio.dev/index.php?title=HeaderBar&amp;diff=3919</id>
		<title>HeaderBar</title>
		<link rel="alternate" type="text/html" href="https://wiki.appstudio.dev/index.php?title=HeaderBar&amp;diff=3919"/>
		<updated>2013-09-18T22:57:00Z</updated>

		<summary type="html">&lt;p&gt;Lpeaker: /* Example (JavaScript) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;jQuery&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[file:HeaderBar.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
The HeaderBar control displays a title and optional left and right buttons at the top of the form. Buttons can be text, an icon or both. When clicked, &#039;&#039;HeaderBarID&#039;&#039;_onclick(&#039;&#039;choice&#039;&#039;) is called. The name of the button which is called is in &#039;&#039;choice&#039;&#039;. If you have an icon with no name as a button, the name of the icon will be passed.&lt;br /&gt;
&lt;br /&gt;
To add a control to your app, choose the control’s 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 control: usually, just onclick.&lt;br /&gt;
&lt;br /&gt;
To be safe, leave a bit of space under the HeaderBar. Its height differs from device to device.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
&lt;br /&gt;
Standard [[properties and methods|properties]] are supported, plus:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| leftButtonIcon || Names of icon for left button. Use false for no icon, or alert, arrow-d, arrow-l ,arrow-r, arrow-u ,back, check, delete, forward, gear, grid, home, info, minus, plus, refresh, search, star. Design time only.&lt;br /&gt;
|-&lt;br /&gt;
| leftButtonName || The name of the left icon. Design time only.&lt;br /&gt;
|-&lt;br /&gt;
| rightButtonIcon || Names of icon for right button. Use false for no icon, or alert, arrow-d, arrow-l ,arrow-r, arrow-u ,back, check, delete, forward, gear, grid, home, info, minus, plus, refresh, search, star. Design time only.&lt;br /&gt;
|-&lt;br /&gt;
| rightButtonName || The name of the right icon. Design time only.&lt;br /&gt;
|-&lt;br /&gt;
| title || The title which appears in the center of the bar. Design time only.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
&lt;br /&gt;
Standard [[events|events]] are supported.&lt;br /&gt;
&lt;br /&gt;
== Example (Basic) ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Function HeaderBar1_onclick(button)&lt;br /&gt;
  If TypeName(button)=&amp;quot;object&amp;quot; Then Exit Function&lt;br /&gt;
  MsgBox &amp;quot;Button &#039;&amp;quot; &amp;amp; button &amp;amp; &amp;quot;&#039; clicked.&amp;quot;&lt;br /&gt;
End Function&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Change the text in a HeaderBar:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  $(&amp;quot;#HeaderBar1 h1&amp;quot;).text(&amp;quot;New Title&amp;quot;)&lt;br /&gt;
  HeaderBar1.children[0].children[0].children[0].innerHTML=&amp;quot;Left Button&amp;quot;&lt;br /&gt;
  HeaderBar1.children[2].children[0].children[0].innerHTML=&amp;quot;Right Button&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example (JavaScript) ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HeaderBar1.onclick = function(button) {&lt;br /&gt;
  if (TypeName(button)==&amp;quot;object&amp;quot;) { return &#039;&#039;; }&lt;br /&gt;
  alert(&amp;quot;Button &#039;&amp;quot; + button + &amp;quot;&#039; clicked.&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Change the text in a HeaderBar. Do not leave the text blank in the design screen:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  $(&amp;quot;#HeaderBar1 h1&amp;quot;).text(&amp;quot;New Title&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Change the font size in a HeaderBar&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$(&#039;#HeaderBar1 *&#039;).css(&#039;font-size&#039;, 10)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Often times it is desirable to hide or show header buttons (left or right) based on data or some programatic event. The following code shows you to hide or show a button on the HeaderBar at run time.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Hides the right button.&lt;br /&gt;
$(&amp;quot;#HeaderBar1&amp;gt;div:last&amp;quot;;).hide()&lt;br /&gt;
&lt;br /&gt;
Hides the left button.&lt;br /&gt;
$(&amp;quot;#HeaderBar1&amp;gt;div:first&amp;quot;;).hide()&lt;br /&gt;
&lt;br /&gt;
Add right button back after it has been hidden,&lt;br /&gt;
$(&amp;quot;#HeaderBar1&amp;gt;div:last&amp;quot;;).show()&lt;br /&gt;
&lt;br /&gt;
Add left button back after it has been hidden,&lt;br /&gt;
$(&amp;quot;#HeaderBar1&amp;gt;div:first&amp;quot;;).show()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Output ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(message box showing “Button &#039;left&#039; clicked.”)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Language Reference]]&lt;br /&gt;
&lt;br /&gt;
[[Category:jQuery Mobile]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Controls]]&lt;/div&gt;</summary>
		<author><name>Lpeaker</name></author>
	</entry>
	<entry>
		<id>https://wiki.appstudio.dev/index.php?title=Grid&amp;diff=3839</id>
		<title>Grid</title>
		<link rel="alternate" type="text/html" href="https://wiki.appstudio.dev/index.php?title=Grid&amp;diff=3839"/>
		<updated>2013-08-20T01:39:28Z</updated>

		<summary type="html">&lt;p&gt;Lpeaker: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[file:Grid.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
The Grid control is used to display data in a table. To add a Grid to your app, choose the Grid icon in the Toolbar. Use the Property Editor to set the properties. &lt;br /&gt;
&lt;br /&gt;
The onclick event can be used to check for clicks. Check event.target.id to find out which cell was clicked.&lt;br /&gt;
&lt;br /&gt;
The width of the grid is set to the total of the pixel widths of the columns, if supplied. Otherwise, it is full width.&lt;br /&gt;
&lt;br /&gt;
If you set the style of the grid to ‘table-layout:fixed;’ it will force the able to maintain cell widths. If the data is too big, it will overflow to the next cell, as in Excel.&lt;br /&gt;
&lt;br /&gt;
If you change the size of a control with scrolling enabled at runtime (by doing addCols or deleteRows, etc.), you need to recalulate the size of the scrolling area by doing &#039;&#039;controlname&#039;&#039;.refresh(). This also applies if you load a new form with a Grid on it: the width also needs to be set:&lt;br /&gt;
&lt;br /&gt;
  Grid1.refresh()&lt;br /&gt;
  Grid1.width=&amp;quot;90%&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To add a control to your app, choose the control’s 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 control: usually, just onclick.&lt;br /&gt;
&lt;br /&gt;
Each cell in the grid has its own id, in the form gridId_x_y. The id of the top left element of Grid1 is Grid1_0_0.&lt;br /&gt;
&lt;br /&gt;
To put an image in a grid cell, do the following:&lt;br /&gt;
&lt;br /&gt;
  Grid1.setValue(0,1,&amp;quot;&amp;lt;img src=&#039;mario.jpg&#039; id=&#039;Grid1_0_1&#039;&amp;gt;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The 0_1 in the ID should have the same column and row as the first two arguments.&lt;br /&gt;
&lt;br /&gt;
To scroll to the top of the grid (row 1), do the following:&lt;br /&gt;
  &lt;br /&gt;
  Grid1_ref.scrollTo(0, 0)&lt;br /&gt;
&lt;br /&gt;
== Properties and Methods ==&lt;br /&gt;
&lt;br /&gt;
Standard [[properties and methods|properties]] are supported, plus:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| addCols(&#039;&#039;n&#039;&#039;) || Add &#039;&#039;n&#039;&#039; columns to the right of the table. Default is 1.&lt;br /&gt;
|-&lt;br /&gt;
| addRows(&#039;&#039;n&#039;&#039;) || Adds &#039;&#039;n&#039;&#039; rows to the end of the table. Default is 1.&lt;br /&gt;
|-&lt;br /&gt;
| alignments || The alignment of the data in each column. Can be left, right, center, justify or char=”.”. Optional. (Design time only)&lt;br /&gt;
|-&lt;br /&gt;
| cell(&#039;&#039;row&#039;&#039;, &#039;&#039;col&#039;&#039;) || Returns a reference to cell x,y.&lt;br /&gt;
|-&lt;br /&gt;
| cellstyle || The style of each cell in the grid. Use cell(x,y).style at runtime.&lt;br /&gt;
|-&lt;br /&gt;
| cols || The number of columns in the table. (Design time only) &lt;br /&gt;
|-&lt;br /&gt;
| colwidths || The width of each column, in pixels (100px), comma separated. Design time only.&lt;br /&gt;
|-&lt;br /&gt;
| deleteCols(&#039;&#039;n&#039;&#039;) || Deletes &#039;&#039;n&#039;&#039; columns from the right of the table. Default is 1.&lt;br /&gt;
|-&lt;br /&gt;
| deleteRows(&#039;&#039;n&#039;&#039;) || Delete n rows from the end of the table. Default is 1.&lt;br /&gt;
|-&lt;br /&gt;
| getColCount() || Returns the number of columns.&lt;br /&gt;
|-&lt;br /&gt;
| getRowCount() || Returns the number of rows.&lt;br /&gt;
|-&lt;br /&gt;
| getValue(&#039;&#039;row&#039;&#039;,&#039;&#039;col&#039;&#039;) || Get the current value of a cell.&lt;br /&gt;
|-&lt;br /&gt;
| rowheights || The height of each row, in pixels (20px) or percentages (20%), comma separated. Read only at runtime.&lt;br /&gt;
|-&lt;br /&gt;
| refresh() || Recalculate the scrolling area after additions or deletions. Used for scrolling grids only.&lt;br /&gt;
|-&lt;br /&gt;
| rows || The number of rows in the table. (Design time only)&lt;br /&gt;
|-&lt;br /&gt;
| scroll_options || This control makes use of iScroll. It has a number of options, including:&lt;br /&gt;
&lt;br /&gt;
bounce: true/false. When the end of the scroll area is reached, should the image bounce?&lt;br /&gt;
&lt;br /&gt;
zoom: true/false. Allow two finger zoom in gesture?&lt;br /&gt;
&lt;br /&gt;
The full list of options is documented here: http://cubiq.org/iscroll-4&lt;br /&gt;
|-&lt;br /&gt;
| scrolling || Allow choices in the menu to scroll? On or off. (design time)&lt;br /&gt;
|-&lt;br /&gt;
| setColumnWidth(&#039;&#039;col&#039;&#039;, &#039;&#039;width&#039;&#039;)  || Sets the width of &#039;&#039;col&#039;&#039; to &#039;&#039;width&#039;&#039;. Needs to be done to all columns to be effective.&lt;br /&gt;
|-&lt;br /&gt;
| setRowHeight(&#039;&#039;row&#039;&#039;, &#039;&#039;height&#039;&#039;) || Sets the height of &#039;&#039;row&#039;&#039; to &#039;&#039;height&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| setValue(&#039;&#039;row&#039;&#039;, &#039;&#039;col&#039;&#039;, &#039;&#039;value&#039;&#039;) || Set the &#039;&#039;value&#039;&#039; of a cell. Can be string or HTML.&lt;br /&gt;
|-&lt;br /&gt;
| titles || The titles for each column, comma separated. Optional. (Design time only)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
&lt;br /&gt;
Grid supports the standard [[events|events]].&lt;br /&gt;
&lt;br /&gt;
== Example 1 (Basic) ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
For row=0 to 3&lt;br /&gt;
  For col=0 to 3&lt;br /&gt;
    Grid1.setValue(row,col,row*col)&lt;br /&gt;
  Next&lt;br /&gt;
Next&lt;br /&gt;
 &lt;br /&gt;
Function Button1_onclick()&lt;br /&gt;
  MsgBox &amp;quot;Grid(3,3)=&amp;quot; &amp;amp; Grid1.getValue(3,3)&lt;br /&gt;
End Function&lt;br /&gt;
 &lt;br /&gt;
Function Grid1_onclick()&lt;br /&gt;
  s=Split(event.target.id, &amp;quot;_&amp;quot;)&lt;br /&gt;
  MsgBox &amp;quot;Click on &amp;quot; &amp;amp; s(0) &amp;amp; &amp;quot; at row &amp;quot; &amp;amp; s(1) &amp;amp; &amp;quot; and column &amp;quot; &amp;amp; s(2)&lt;br /&gt;
  MsgBox &amp;quot;Value is &amp;quot; &amp;amp; Grid1.getValue(s(1),s(2))&lt;br /&gt;
End Function&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set the color of a cell:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Grid1.cell(1,1).style.backgroundColor=&amp;quot;red&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example 1 (JavaScript) ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for(row=0; row &amp;lt;= 3; row++) {&lt;br /&gt;
  for(col=0; col &amp;lt;= 3; col++) {&lt;br /&gt;
    Grid1.setValue(row,col,row*col);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Button1.onclick = function() {&lt;br /&gt;
  alert(&amp;quot;Grid[3,3]=&amp;quot; + Grid1.getValue(3,3));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Grid1.onclick = function() {&lt;br /&gt;
  s=Split(event.target.id, &amp;quot;_&amp;quot;);&lt;br /&gt;
  alert(&amp;quot;Click on &amp;quot; + s[0] +  &amp;quot; at row &amp;quot; +  s[1] + &amp;quot; and column &amp;quot; +  s[2]);&lt;br /&gt;
  alert(&amp;quot;Value is &amp;quot; + Grid1.getValue(s[1] ,s[2]));&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set the color of a cell:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Grid1.cell[1,1].style.backgroundColor=&amp;quot;red&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example 2 (Basic) ==&lt;br /&gt;
This sample code will add 100 rows to a grid with 4 columns and it will alternate the row colors.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Grid1.setRowHeight(0, &amp;quot;18px&amp;quot;)&lt;br /&gt;
 &#039;Add 100 rows with 4 cols to the grid.&lt;br /&gt;
 For row=1 To 100&lt;br /&gt;
   Grid1.addRows(1)&lt;br /&gt;
   Grid1.setRowHeight(0, &amp;quot;14px&amp;quot;)&lt;br /&gt;
   For col=0 To 3&lt;br /&gt;
     If col = 0 Then&lt;br /&gt;
         Grid1.setValue(row,col,&amp;quot;Row &amp;quot; + row)&lt;br /&gt;
     Else&lt;br /&gt;
         Grid1.setValue(row,col,row*col)&lt;br /&gt;
     End If&lt;br /&gt;
     &#039;Paints each row in alernating color.&lt;br /&gt;
     If (Abs(row) % 2) = 1 Then&lt;br /&gt;
       Grid1.cell(row,col).style.backgroundColor = RGB(255,255,240)&lt;br /&gt;
     Else&lt;br /&gt;
       Grid1.cell(row,col).style.backgroundColor = RGB(240,248,255)&lt;br /&gt;
     End If&lt;br /&gt;
   Next&lt;br /&gt;
 Next&lt;br /&gt;
 Grid1.refresh()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example 2 (JavaScript) ==&lt;br /&gt;
This sample code will add 100 rows to a grid with 4 columns and it will alternate the row colors.&lt;br /&gt;
&amp;lt;pre&amp;gt;  &lt;br /&gt;
  Grid1.setRowHeight(0, &amp;quot;18px&amp;quot;);&lt;br /&gt;
  //Add 100 rows with 4 cols to the grid.&lt;br /&gt;
  for(row=1; row &amp;lt;= 100; row++) {&lt;br /&gt;
    Grid1.addRows(1);&lt;br /&gt;
    Grid1.setRowHeight(0, &amp;quot;14px&amp;quot;);&lt;br /&gt;
    for(col=0; col &amp;lt;= 3; col++) {&lt;br /&gt;
      if(col == 0) {&lt;br /&gt;
        Grid1.setValue(row,col,&amp;quot;Row &amp;quot; + row);&lt;br /&gt;
      } else {&lt;br /&gt;
        Grid1.setValue(row,col,row*col);&lt;br /&gt;
      }&lt;br /&gt;
      //Paints each row in alernating color.&lt;br /&gt;
      if((Math.abs(row) % 2) == 1) {&lt;br /&gt;
        Grid1.cell(row,col).style.backgroundColor = RGB(255,255,240);&lt;br /&gt;
      } else {&lt;br /&gt;
        Grid1.cell(row,col).style.backgroundColor = RGB(240,248,255);&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  Grid1.refresh();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setting Grid Font (JavaScript) ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$(&amp;quot;#Grid1 td&amp;quot;).css(&amp;quot;font-family&amp;quot;, &amp;quot;Courier New&amp;quot;) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setting Grid Font (BASIC) ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
For i = 0 To Grid1.children[0].children.length - 1&lt;br /&gt;
  For j = 0 To Grid1.children[0].children[i].children.length - 1&lt;br /&gt;
    Grid1.children[0].children[i].children[j].style.fontFamily=&amp;quot;Courier new&amp;quot;&lt;br /&gt;
  Next&lt;br /&gt;
Next&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Output ==&lt;br /&gt;
&lt;br /&gt;
[[file:GridOutput.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Language Reference]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Controls]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Common]]&lt;/div&gt;</summary>
		<author><name>Lpeaker</name></author>
	</entry>
	<entry>
		<id>https://wiki.appstudio.dev/index.php?title=HeaderBar&amp;diff=3782</id>
		<title>HeaderBar</title>
		<link rel="alternate" type="text/html" href="https://wiki.appstudio.dev/index.php?title=HeaderBar&amp;diff=3782"/>
		<updated>2013-08-10T14:51:46Z</updated>

		<summary type="html">&lt;p&gt;Lpeaker: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;jQuery&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[file:HeaderBar.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
The HeaderBar control displays a title and optional left and right buttons at the top of the form. Buttons can be text, an icon or both. When clicked, &#039;&#039;HeaderBarID&#039;&#039;_onclick(&#039;&#039;choice&#039;&#039;) is called. The name of the button which is called is in &#039;&#039;choice&#039;&#039;. If you have an icon with no name as a button, the name of the icon will be passed.&lt;br /&gt;
&lt;br /&gt;
To add a control to your app, choose the control’s 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 control: usually, just onclick.&lt;br /&gt;
&lt;br /&gt;
To be safe, leave a bit of space under the HeaderBar. Its height differs from device to device.&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
&lt;br /&gt;
Standard [[properties and methods|properties]] are supported, plus:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| leftButtonIcon || Names of icon for left button. Use false for no icon, or alert, arrow-d, arrow-l ,arrow-r, arrow-u ,back, check, delete, forward, gear, grid, home, info, minus, plus, refresh, search, star. Design time only.&lt;br /&gt;
|-&lt;br /&gt;
| leftButtonName || The name of the left icon. Design time only.&lt;br /&gt;
|-&lt;br /&gt;
| rightButtonIcon || Names of icon for right button. Use false for no icon, or alert, arrow-d, arrow-l ,arrow-r, arrow-u ,back, check, delete, forward, gear, grid, home, info, minus, plus, refresh, search, star. Design time only.&lt;br /&gt;
|-&lt;br /&gt;
| rightButtonName || The name of the right icon. Design time only.&lt;br /&gt;
|-&lt;br /&gt;
| title || The title which appears in the center of the bar. Design time only.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
&lt;br /&gt;
Standard [[events|events]] are supported.&lt;br /&gt;
&lt;br /&gt;
== Example (Basic) ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Function HeaderBar1_onclick(button)&lt;br /&gt;
  If TypeName(button)=&amp;quot;object&amp;quot; Then Exit Function&lt;br /&gt;
  MsgBox &amp;quot;Button &#039;&amp;quot; &amp;amp; button &amp;amp; &amp;quot;&#039; clicked.&amp;quot;&lt;br /&gt;
End Function&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Change the text in a HeaderBar:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  $(&amp;quot;#HeaderBar1 h1&amp;quot;).text(&amp;quot;New Title&amp;quot;)&lt;br /&gt;
  HeaderBar1.children[0].children[0].children[0].innerHTML=&amp;quot;Left Button&amp;quot;&lt;br /&gt;
  HeaderBar1.children[2].children[0].children[0].innerHTML=&amp;quot;Right Button&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example (JavaScript) ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HeaderBar1.onclick = function(button) {&lt;br /&gt;
  if (TypeName(button)==&amp;quot;object&amp;quot;) { return &#039;&#039;; }&lt;br /&gt;
  alert(&amp;quot;Button &#039;&amp;quot; + button + &amp;quot;&#039; clicked.&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Change the text in a HeaderBar:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  $(&amp;quot;#HeaderBar1 h1&amp;quot;).text(&amp;quot;New Title&amp;quot;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Change the font size in a HeaderBar&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$(&#039;#HeaderBar1 *&#039;).css(&#039;font-size&#039;, 10)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Often times it is desirable to hide or show header buttons (left or right) based on data or other some programatic event. The following code shows you do hide or show a button op the HeaderBar.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Hides the right button.&lt;br /&gt;
$(&amp;quot;#HeaderBar1&amp;gt;div:last&amp;quot;;).hide()&lt;br /&gt;
&lt;br /&gt;
Hides the left button.&lt;br /&gt;
$(&amp;quot;#HeaderBar1&amp;gt;div:first&amp;quot;;).hide()&lt;br /&gt;
&lt;br /&gt;
Add right button back after it has been hidden,&lt;br /&gt;
$(&amp;quot;#HeaderBar1&amp;gt;div:last&amp;quot;;).show()&lt;br /&gt;
&lt;br /&gt;
Add left button back after it has been hidden,&lt;br /&gt;
$(&amp;quot;#HeaderBar1&amp;gt;div:first&amp;quot;;).show()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Output ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(message box showing “Button &#039;left&#039; clicked.”)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Language Reference]]&lt;br /&gt;
&lt;br /&gt;
[[Category:jQuery Mobile]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Controls]]&lt;/div&gt;</summary>
		<author><name>Lpeaker</name></author>
	</entry>
	<entry>
		<id>https://wiki.appstudio.dev/index.php?title=Grid&amp;diff=2229</id>
		<title>Grid</title>
		<link rel="alternate" type="text/html" href="https://wiki.appstudio.dev/index.php?title=Grid&amp;diff=2229"/>
		<updated>2013-01-05T17:48:31Z</updated>

		<summary type="html">&lt;p&gt;Lpeaker: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[file:Grid.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
The Grid control is used to display data in a table. To add a Grid to your app, choose the Grid icon in the Toolbar. Use the Property Editor to set the properties. &lt;br /&gt;
&lt;br /&gt;
The onclick event can be used to check for clicks. Check event.target.id to find out which cell was clicked.&lt;br /&gt;
&lt;br /&gt;
The width of the grid is set to the total of the pixel widths of the columns, if supplied. Otherwise, it is full width.&lt;br /&gt;
&lt;br /&gt;
If you set the style of the grid to ‘table-layout:fixed;’ it will force the able to maintain cell widths. If the data is too big, it will overflow to the next cell, as in Excel.&lt;br /&gt;
&lt;br /&gt;
If you change the size of a control with scrolling enabled at runtime (by doing addCols or deleteRows, etc.), you need to recalulate the size of the scrolling area by doing &#039;&#039;controlname&#039;&#039;.refresh(). This also applies if you load a new form with a Grid on it: the width also needs to be set:&lt;br /&gt;
&lt;br /&gt;
  Grid1.refresh()&lt;br /&gt;
&lt;br /&gt;
To add a control to your app, choose the control’s 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 control: usually, just onclick.&lt;br /&gt;
&lt;br /&gt;
Each cell in the grid has its own id, in the form gridId_x_y. The id of the top left element of Grid1 is Grid1_0_0.&lt;br /&gt;
&lt;br /&gt;
To put an image in a grid cell, do the following:&lt;br /&gt;
&lt;br /&gt;
  Grid1.setValue(0,1,&amp;quot;&amp;lt;img src=&#039;mario.jpg&#039; id=&#039;Grid1_0_1&#039;&amp;gt;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The 0_1 in the ID should have the same column and row as the first two arguments.&lt;br /&gt;
&lt;br /&gt;
== Properties and Methods ==&lt;br /&gt;
&lt;br /&gt;
Standard [[properties and methods|properties]] are supported, plus:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| addCols(&#039;&#039;n&#039;&#039;) || Add &#039;&#039;n&#039;&#039; columns to the right of the table. Default is 1.&lt;br /&gt;
|-&lt;br /&gt;
| addRows(&#039;&#039;n&#039;&#039;) || Adds &#039;&#039;n&#039;&#039; rows to the end of the table. Default is 1.&lt;br /&gt;
|-&lt;br /&gt;
| alignments || The alignment of the data in each column. Can be left, right, center, justify or char=”.”. Optional. (Design time only)&lt;br /&gt;
|-&lt;br /&gt;
| cell(&#039;&#039;row&#039;&#039;, &#039;&#039;col&#039;&#039;) || Returns a reference to cell x,y.&lt;br /&gt;
|-&lt;br /&gt;
| cellstyle || The style of each cell in the grid. Use cell(x,y).style at runtime.&lt;br /&gt;
|-&lt;br /&gt;
| cols || The number of columns in the table. (Design time only) &lt;br /&gt;
|-&lt;br /&gt;
| colwidths || The width of each column, in pixels (100px), comma separated. Design time only.&lt;br /&gt;
|-&lt;br /&gt;
| deleteCols(&#039;&#039;n&#039;&#039;) || Deletes &#039;&#039;n&#039;&#039; columns from the right of the table. Default is 1.&lt;br /&gt;
|-&lt;br /&gt;
| deleteRows(&#039;&#039;n&#039;&#039;) || Delete n rows from the end of the table. Default is 1.&lt;br /&gt;
|-&lt;br /&gt;
| getColCount() || Returns the number of columns.&lt;br /&gt;
|-&lt;br /&gt;
| getRowCount() || Returns the number of rows.&lt;br /&gt;
|-&lt;br /&gt;
| getValue(&#039;&#039;row&#039;&#039;,&#039;&#039;col&#039;&#039;) || Get the current value of a cell.&lt;br /&gt;
|-&lt;br /&gt;
| rowheights || The height of each row, in pixels (20px) or percentages (20%), comma separated. Read only at runtime.&lt;br /&gt;
|-&lt;br /&gt;
| refresh() || Recalculate the scrolling area after additions or deletions.&lt;br /&gt;
|-&lt;br /&gt;
| rows || The number of rows in the table. (Design time only)&lt;br /&gt;
|-&lt;br /&gt;
| scroll_options || This control makes use of iScroll. It has a number of options, including:&lt;br /&gt;
&lt;br /&gt;
bounce: true/false. When the end of the scroll area is reached, should the image bounce?&lt;br /&gt;
&lt;br /&gt;
zoom: true/false. Allow two finger zoom in gesture?&lt;br /&gt;
&lt;br /&gt;
The full list of options is documented here: http://cubiq.org/iscroll-4&lt;br /&gt;
|-&lt;br /&gt;
| scrollHeight || The size of the scrolling area. (design time)&lt;br /&gt;
|-&lt;br /&gt;
| scrolling || Allow choices in the menu to scroll? On or off. (design time)&lt;br /&gt;
|-&lt;br /&gt;
| setColumnWidth(&#039;&#039;col&#039;&#039;, &#039;&#039;width&#039;&#039;)  || Sets the width of &#039;&#039;col&#039;&#039; to &#039;&#039;width&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| setRowHeight(&#039;&#039;row&#039;&#039;, &#039;&#039;height&#039;&#039;) || Sets the height of &#039;&#039;row&#039;&#039; to &#039;&#039;height&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| setValue(&#039;&#039;row&#039;&#039;, &#039;&#039;col&#039;&#039;, &#039;&#039;value&#039;&#039;) || Set the &#039;&#039;value&#039;&#039; of a cell. Can be string or HTML.&lt;br /&gt;
|-&lt;br /&gt;
| titles || The titles for each column, comma separated. Optional. (Design time only)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
&lt;br /&gt;
Grid supports the standard [[events|events]].&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
For row=0 to 3&lt;br /&gt;
  For col=0 to 3&lt;br /&gt;
    Grid1.setValue(row,col,row*col)&lt;br /&gt;
  Next&lt;br /&gt;
Next&lt;br /&gt;
 &lt;br /&gt;
Function Button1_onclick()&lt;br /&gt;
  MsgBox &amp;quot;Grid(3,3)=&amp;quot; &amp;amp; Grid1.getValue(3,3)&lt;br /&gt;
End Function&lt;br /&gt;
 &lt;br /&gt;
Function Grid1_onclick()&lt;br /&gt;
  s=Split(event.target.id, &amp;quot;_&amp;quot;)&lt;br /&gt;
  MsgBox &amp;quot;Click on &amp;quot; &amp;amp; s(0) &amp;amp; &amp;quot; at row &amp;quot; &amp;amp; s(1) &amp;amp; &amp;quot; and column &amp;quot; &amp;amp; s(2)&lt;br /&gt;
  MsgBox &amp;quot;Value is &amp;quot; &amp;amp; Grid1.getValue(s(1),s(2))&lt;br /&gt;
End Function&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set the color of a cell:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Grid1.cell(1,1).style.backgroundColor=&amp;quot;red&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This sample code will add 100 rows to a grid with 4 columns and it will alternate the row colors.&lt;br /&gt;
  &lt;br /&gt;
  Grid1.setRowHeight(0, &amp;quot;18px&amp;quot;)&lt;br /&gt;
  &#039;Add 100 rows with 4 cols to the grid.&lt;br /&gt;
  For row=1 To 100&lt;br /&gt;
    Grid1.addRows(1)&lt;br /&gt;
    Grid1.setRowHeight(0, &amp;quot;14px&amp;quot;)&lt;br /&gt;
    For col=0 To 3&lt;br /&gt;
      If col = 0 Then&lt;br /&gt;
          Grid1.setValue(row,col,&amp;quot;Row &amp;quot; + row)&lt;br /&gt;
      Else&lt;br /&gt;
          Grid1.setValue(row,col,row*col)&lt;br /&gt;
      End If&lt;br /&gt;
      &#039;Paints each row in alernating color.&lt;br /&gt;
      If (Abs(row) % 2) = 1 Then&lt;br /&gt;
        Grid1.cell(row,col).style.backgroundColor = RGB(255,255,240)&lt;br /&gt;
      Else&lt;br /&gt;
        Grid1.cell(row,col).style.backgroundColor = RGB(240,248,255)&lt;br /&gt;
      End If&lt;br /&gt;
    Next&lt;br /&gt;
  Next&lt;br /&gt;
  Grid1.refresh()&lt;br /&gt;
&lt;br /&gt;
== Output ==&lt;br /&gt;
&lt;br /&gt;
[[file:GridOutput.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Language Reference]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Controls]]&lt;br /&gt;
&lt;br /&gt;
[[Category:jQuery Mobile]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Classic]]&lt;/div&gt;</summary>
		<author><name>Lpeaker</name></author>
	</entry>
	<entry>
		<id>https://wiki.appstudio.dev/index.php?title=Grid&amp;diff=2228</id>
		<title>Grid</title>
		<link rel="alternate" type="text/html" href="https://wiki.appstudio.dev/index.php?title=Grid&amp;diff=2228"/>
		<updated>2013-01-05T17:47:00Z</updated>

		<summary type="html">&lt;p&gt;Lpeaker: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[file:Grid.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
The Grid control is used to display data in a table. To add a Grid to your app, choose the Grid icon in the Toolbar. Use the Property Editor to set the properties. &lt;br /&gt;
&lt;br /&gt;
The onclick event can be used to check for clicks. Check event.target.id to find out which cell was clicked.&lt;br /&gt;
&lt;br /&gt;
The width of the grid is set to the total of the pixel widths of the columns, if supplied. Otherwise, it is full width.&lt;br /&gt;
&lt;br /&gt;
If you set the style of the grid to ‘table-layout:fixed;’ it will force the able to maintain cell widths. If the data is too big, it will overflow to the next cell, as in Excel.&lt;br /&gt;
&lt;br /&gt;
If you change the size of a control with scrolling enabled at runtime (by doing addCols or deleteRows, etc.), you need to recalulate the size of the scrolling area by doing &#039;&#039;controlname&#039;&#039;.refresh(). This also applies if you load a new form with a Grid on it: the width also needs to be set:&lt;br /&gt;
&lt;br /&gt;
  Grid1.refresh()&lt;br /&gt;
&lt;br /&gt;
To add a control to your app, choose the control’s 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 control: usually, just onclick.&lt;br /&gt;
&lt;br /&gt;
Each cell in the grid has its own id, in the form gridId_x_y. The id of the top left element of Grid1 is Grid1_0_0.&lt;br /&gt;
&lt;br /&gt;
To put an image in a grid cell, do the following:&lt;br /&gt;
&lt;br /&gt;
  Grid1.setValue(0,1,&amp;quot;&amp;lt;img src=&#039;mario.jpg&#039; id=&#039;Grid1_0_1&#039;&amp;gt;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The 0_1 in the ID should have the same column and row as the first two arguments.&lt;br /&gt;
&lt;br /&gt;
== Properties and Methods ==&lt;br /&gt;
&lt;br /&gt;
Standard [[properties and methods|properties]] are supported, plus:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| addCols(&#039;&#039;n&#039;&#039;) || Add &#039;&#039;n&#039;&#039; columns to the right of the table. Default is 1.&lt;br /&gt;
|-&lt;br /&gt;
| addRows(&#039;&#039;n&#039;&#039;) || Adds &#039;&#039;n&#039;&#039; rows to the end of the table. Default is 1.&lt;br /&gt;
|-&lt;br /&gt;
| alignments || The alignment of the data in each column. Can be left, right, center, justify or char=”.”. Optional. (Design time only)&lt;br /&gt;
|-&lt;br /&gt;
| cell(&#039;&#039;row&#039;&#039;, &#039;&#039;col&#039;&#039;) || Returns a reference to cell x,y.&lt;br /&gt;
|-&lt;br /&gt;
| cellstyle || The style of each cell in the grid. Use cell(x,y).style at runtime.&lt;br /&gt;
|-&lt;br /&gt;
| cols || The number of columns in the table. (Design time only) &lt;br /&gt;
|-&lt;br /&gt;
| colwidths || The width of each column, in pixels (100px), comma separated. Design time only.&lt;br /&gt;
|-&lt;br /&gt;
| deleteCols(&#039;&#039;n&#039;&#039;) || Deletes &#039;&#039;n&#039;&#039; columns from the right of the table. Default is 1.&lt;br /&gt;
|-&lt;br /&gt;
| deleteRows(&#039;&#039;n&#039;&#039;) || Delete n rows from the end of the table. Default is 1.&lt;br /&gt;
|-&lt;br /&gt;
| getColCount() || Returns the number of columns.&lt;br /&gt;
|-&lt;br /&gt;
| getRowCount() || Returns the number of rows.&lt;br /&gt;
|-&lt;br /&gt;
| getValue(&#039;&#039;row&#039;&#039;,&#039;&#039;col&#039;&#039;) || Get the current value of a cell.&lt;br /&gt;
|-&lt;br /&gt;
| rowheights || The height of each row, in pixels (20px) or percentages (20%), comma separated. Read only at runtime.&lt;br /&gt;
|-&lt;br /&gt;
| refresh() || Recalculate the scrolling area after additions or deletions.&lt;br /&gt;
|-&lt;br /&gt;
| rows || The number of rows in the table. (Design time only)&lt;br /&gt;
|-&lt;br /&gt;
| scroll_options || This control makes use of iScroll. It has a number of options, including:&lt;br /&gt;
&lt;br /&gt;
bounce: true/false. When the end of the scroll area is reached, should the image bounce?&lt;br /&gt;
&lt;br /&gt;
zoom: true/false. Allow two finger zoom in gesture?&lt;br /&gt;
&lt;br /&gt;
The full list of options is documented here: http://cubiq.org/iscroll-4&lt;br /&gt;
|-&lt;br /&gt;
| scrollHeight || The size of the scrolling area. (design time)&lt;br /&gt;
|-&lt;br /&gt;
| scrolling || Allow choices in the menu to scroll? On or off. (design time)&lt;br /&gt;
|-&lt;br /&gt;
| setColumnWidth(&#039;&#039;col&#039;&#039;, &#039;&#039;width&#039;&#039;)  || Sets the width of &#039;&#039;col&#039;&#039; to &#039;&#039;width&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| setRowHeight(&#039;&#039;row&#039;&#039;, &#039;&#039;height&#039;&#039;) || Sets the height of &#039;&#039;row&#039;&#039; to &#039;&#039;height&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| setValue(&#039;&#039;row&#039;&#039;, &#039;&#039;col&#039;&#039;, &#039;&#039;value&#039;&#039;) || Set the &#039;&#039;value&#039;&#039; of a cell. Can be string or HTML.&lt;br /&gt;
|-&lt;br /&gt;
| titles || The titles for each column, comma separated. Optional. (Design time only)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
&lt;br /&gt;
Grid supports the standard [[events|events]].&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
For row=0 to 3&lt;br /&gt;
  For col=0 to 3&lt;br /&gt;
    Grid1.setValue(row,col,row*col)&lt;br /&gt;
  Next&lt;br /&gt;
Next&lt;br /&gt;
 &lt;br /&gt;
Function Button1_onclick()&lt;br /&gt;
  MsgBox &amp;quot;Grid(3,3)=&amp;quot; &amp;amp; Grid1.getValue(3,3)&lt;br /&gt;
End Function&lt;br /&gt;
 &lt;br /&gt;
Function Grid1_onclick()&lt;br /&gt;
  s=Split(event.target.id, &amp;quot;_&amp;quot;)&lt;br /&gt;
  MsgBox &amp;quot;Click on &amp;quot; &amp;amp; s(0) &amp;amp; &amp;quot; at row &amp;quot; &amp;amp; s(1) &amp;amp; &amp;quot; and column &amp;quot; &amp;amp; s(2)&lt;br /&gt;
  MsgBox &amp;quot;Value is &amp;quot; &amp;amp; Grid1.getValue(s(1),s(2))&lt;br /&gt;
End Function&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set the color of a cell:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Grid1.cell(1,1).style.backgroundColor=&amp;quot;red&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Output ==&lt;br /&gt;
&lt;br /&gt;
[[file:GridOutput.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Language Reference]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Controls]]&lt;br /&gt;
&lt;br /&gt;
[[Category:jQuery Mobile]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Classic]]&lt;/div&gt;</summary>
		<author><name>Lpeaker</name></author>
	</entry>
	<entry>
		<id>https://wiki.appstudio.dev/index.php?title=Grid&amp;diff=2227</id>
		<title>Grid</title>
		<link rel="alternate" type="text/html" href="https://wiki.appstudio.dev/index.php?title=Grid&amp;diff=2227"/>
		<updated>2013-01-05T17:45:37Z</updated>

		<summary type="html">&lt;p&gt;Lpeaker: Sample code to add rows to a grid and alternate the row colors.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[file:Grid.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
The Grid control is used to display data in a table. To add a Grid to your app, choose the Grid icon in the Toolbar. Use the Property Editor to set the properties. &lt;br /&gt;
&lt;br /&gt;
The onclick event can be used to check for clicks. Check event.target.id to find out which cell was clicked.&lt;br /&gt;
&lt;br /&gt;
The width of the grid is set to the total of the pixel widths of the columns, if supplied. Otherwise, it is full width.&lt;br /&gt;
&lt;br /&gt;
If you set the style of the grid to ‘table-layout:fixed;’ it will force the able to maintain cell widths. If the data is too big, it will overflow to the next cell, as in Excel.&lt;br /&gt;
&lt;br /&gt;
If you change the size of a control with scrolling enabled at runtime (by doing addCols or deleteRows, etc.), you need to recalulate the size of the scrolling area by doing &#039;&#039;controlname&#039;&#039;.refresh(). This also applies if you load a new form with a Grid on it: the width also needs to be set:&lt;br /&gt;
&lt;br /&gt;
  Grid1.refresh()&lt;br /&gt;
&lt;br /&gt;
To add a control to your app, choose the control’s 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 control: usually, just onclick.&lt;br /&gt;
&lt;br /&gt;
Each cell in the grid has its own id, in the form gridId_x_y. The id of the top left element of Grid1 is Grid1_0_0.&lt;br /&gt;
&lt;br /&gt;
To put an image in a grid cell, do the following:&lt;br /&gt;
&lt;br /&gt;
  Grid1.setValue(0,1,&amp;quot;&amp;lt;img src=&#039;mario.jpg&#039; id=&#039;Grid1_0_1&#039;&amp;gt;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The 0_1 in the ID should have the same column and row as the first two arguments.&lt;br /&gt;
&lt;br /&gt;
This sample code will add 100 rows to a grid with 4 columns and it will alternate the row colors.&lt;br /&gt;
  &lt;br /&gt;
  Grid1.setRowHeight(0, &amp;quot;18px&amp;quot;)&lt;br /&gt;
  &#039;Add 100 rows with 4 cols to the grid.&lt;br /&gt;
  For row=1 To 100&lt;br /&gt;
    Grid1.addRows(1)&lt;br /&gt;
    Grid1.setRowHeight(0, &amp;quot;14px&amp;quot;)&lt;br /&gt;
    For col=0 To 3&lt;br /&gt;
      If col = 0 Then&lt;br /&gt;
          Grid1.setValue(row,col,&amp;quot;Row &amp;quot; + row)&lt;br /&gt;
      Else&lt;br /&gt;
          Grid1.setValue(row,col,row*col)&lt;br /&gt;
      End If&lt;br /&gt;
      &#039;Paints each row in alernating color.&lt;br /&gt;
      If (Abs(row) % 2) = 1 Then&lt;br /&gt;
        Grid1.cell(row,col).style.backgroundColor = RGB(255,255,240)&lt;br /&gt;
      Else&lt;br /&gt;
        Grid1.cell(row,col).style.backgroundColor = RGB(240,248,255)&lt;br /&gt;
      End If&lt;br /&gt;
    Next&lt;br /&gt;
  Next&lt;br /&gt;
  Grid1.refresh()&lt;br /&gt;
&lt;br /&gt;
== Properties and Methods ==&lt;br /&gt;
&lt;br /&gt;
Standard [[properties and methods|properties]] are supported, plus:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| addCols(&#039;&#039;n&#039;&#039;) || Add &#039;&#039;n&#039;&#039; columns to the right of the table. Default is 1.&lt;br /&gt;
|-&lt;br /&gt;
| addRows(&#039;&#039;n&#039;&#039;) || Adds &#039;&#039;n&#039;&#039; rows to the end of the table. Default is 1.&lt;br /&gt;
|-&lt;br /&gt;
| alignments || The alignment of the data in each column. Can be left, right, center, justify or char=”.”. Optional. (Design time only)&lt;br /&gt;
|-&lt;br /&gt;
| cell(&#039;&#039;row&#039;&#039;, &#039;&#039;col&#039;&#039;) || Returns a reference to cell x,y.&lt;br /&gt;
|-&lt;br /&gt;
| cellstyle || The style of each cell in the grid. Use cell(x,y).style at runtime.&lt;br /&gt;
|-&lt;br /&gt;
| cols || The number of columns in the table. (Design time only) &lt;br /&gt;
|-&lt;br /&gt;
| colwidths || The width of each column, in pixels (100px), comma separated. Design time only.&lt;br /&gt;
|-&lt;br /&gt;
| deleteCols(&#039;&#039;n&#039;&#039;) || Deletes &#039;&#039;n&#039;&#039; columns from the right of the table. Default is 1.&lt;br /&gt;
|-&lt;br /&gt;
| deleteRows(&#039;&#039;n&#039;&#039;) || Delete n rows from the end of the table. Default is 1.&lt;br /&gt;
|-&lt;br /&gt;
| getColCount() || Returns the number of columns.&lt;br /&gt;
|-&lt;br /&gt;
| getRowCount() || Returns the number of rows.&lt;br /&gt;
|-&lt;br /&gt;
| getValue(&#039;&#039;row&#039;&#039;,&#039;&#039;col&#039;&#039;) || Get the current value of a cell.&lt;br /&gt;
|-&lt;br /&gt;
| rowheights || The height of each row, in pixels (20px) or percentages (20%), comma separated. Read only at runtime.&lt;br /&gt;
|-&lt;br /&gt;
| refresh() || Recalculate the scrolling area after additions or deletions.&lt;br /&gt;
|-&lt;br /&gt;
| rows || The number of rows in the table. (Design time only)&lt;br /&gt;
|-&lt;br /&gt;
| scroll_options || This control makes use of iScroll. It has a number of options, including:&lt;br /&gt;
&lt;br /&gt;
bounce: true/false. When the end of the scroll area is reached, should the image bounce?&lt;br /&gt;
&lt;br /&gt;
zoom: true/false. Allow two finger zoom in gesture?&lt;br /&gt;
&lt;br /&gt;
The full list of options is documented here: http://cubiq.org/iscroll-4&lt;br /&gt;
|-&lt;br /&gt;
| scrollHeight || The size of the scrolling area. (design time)&lt;br /&gt;
|-&lt;br /&gt;
| scrolling || Allow choices in the menu to scroll? On or off. (design time)&lt;br /&gt;
|-&lt;br /&gt;
| setColumnWidth(&#039;&#039;col&#039;&#039;, &#039;&#039;width&#039;&#039;)  || Sets the width of &#039;&#039;col&#039;&#039; to &#039;&#039;width&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| setRowHeight(&#039;&#039;row&#039;&#039;, &#039;&#039;height&#039;&#039;) || Sets the height of &#039;&#039;row&#039;&#039; to &#039;&#039;height&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| setValue(&#039;&#039;row&#039;&#039;, &#039;&#039;col&#039;&#039;, &#039;&#039;value&#039;&#039;) || Set the &#039;&#039;value&#039;&#039; of a cell. Can be string or HTML.&lt;br /&gt;
|-&lt;br /&gt;
| titles || The titles for each column, comma separated. Optional. (Design time only)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
&lt;br /&gt;
Grid supports the standard [[events|events]].&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
For row=0 to 3&lt;br /&gt;
  For col=0 to 3&lt;br /&gt;
    Grid1.setValue(row,col,row*col)&lt;br /&gt;
  Next&lt;br /&gt;
Next&lt;br /&gt;
 &lt;br /&gt;
Function Button1_onclick()&lt;br /&gt;
  MsgBox &amp;quot;Grid(3,3)=&amp;quot; &amp;amp; Grid1.getValue(3,3)&lt;br /&gt;
End Function&lt;br /&gt;
 &lt;br /&gt;
Function Grid1_onclick()&lt;br /&gt;
  s=Split(event.target.id, &amp;quot;_&amp;quot;)&lt;br /&gt;
  MsgBox &amp;quot;Click on &amp;quot; &amp;amp; s(0) &amp;amp; &amp;quot; at row &amp;quot; &amp;amp; s(1) &amp;amp; &amp;quot; and column &amp;quot; &amp;amp; s(2)&lt;br /&gt;
  MsgBox &amp;quot;Value is &amp;quot; &amp;amp; Grid1.getValue(s(1),s(2))&lt;br /&gt;
End Function&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set the color of a cell:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  Grid1.cell(1,1).style.backgroundColor=&amp;quot;red&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Output ==&lt;br /&gt;
&lt;br /&gt;
[[file:GridOutput.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Language Reference]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Controls]]&lt;br /&gt;
&lt;br /&gt;
[[Category:jQuery Mobile]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Classic]]&lt;/div&gt;</summary>
		<author><name>Lpeaker</name></author>
	</entry>
</feed>