<?xml version="1.0" encoding="utf-8"?>
<Application>
	<AppTitle>ListBox Example</AppTitle>
	<DesignDeviceName>Samsung Galaxy Tab 7</DesignDeviceName>
	<Variables>[Autos([Found])],[Autos([Len]-1)],[Autos],[Breakfast],[Found],[Len],[Listbox1],[Listbox2],[Listbox3],[TextInput1]</Variables>
	<VariablesScanned>True</VariablesScanned>
	<PageWidth>1024</PageWidth>
	<PageHeight>600</PageHeight>
	<AutoSizeWidth>False</AutoSizeWidth>
	<AutoSizeHeight>False</AutoSizeHeight>
	<HideScrollbars>False</HideScrollbars>
	<PublishPlatform>WinEXE</PublishPlatform>
	<EmptyBuildFolder>False</EmptyBuildFolder>
	<LanguageCode>en</LanguageCode>
	<MobileOSTypes>[AndroidOS,iOS,WindowsPhoneOS]</MobileOSTypes>
	<WindowState>normal</WindowState>
	<TitleBar>True</TitleBar>
	<Sizeable>False</Sizeable>
	<MaximizeBtn>False</MaximizeBtn>
	<MinimizeBtn>True</MinimizeBtn>
	<SystemMenu>True</SystemMenu>
	<ContextMenu>False</ContextMenu>
	<AlwaysOnTop>False</AlwaysOnTop>
	<ShowInTaskbar>True</ShowInTaskbar>
	<SingleInstance>False</SingleInstance>
	<ChromeKioskMode>False</ChromeKioskMode>
	<startup>.create empty array variable for our listbox on page 2
CreateArray [Autos] &quot;&quot;

slCenterApp 1024 600
slAppBackgroundColor &quot;#efefef&quot;</startup>
	<Components>
		<FunctionList name="Subroutines"/>
		<LibraryList name="Libraries"/>
		<PageList name="Main">
			<Components>
				<Page id="Page1">
					<enter_effect>fadeIn</enter_effect>
					<exit_effect>fadeOut</exit_effect>
					<pageenter>slSetCSSProperty &quot;Page1&quot; &quot;border&quot; &quot;1px solid black&quot;
slSetCSSProperty &quot;Page1&quot; &quot;overflow&quot; &quot;hidden&quot;</pageenter>
					<Components>
						<Listbox id="Listbox1">
							<left>216px</left>
							<top>208px</top>
							<width>152px</width>
							<height>180px</height>
							<items>Alabama,Alaska,Arizona,Arkansas,California,Colorado,Connecticut,Delaware,Florida,Georgia,Hawaii,Idaho,Illinois,Indiana,Iowa,Kansas,Kentucky,Louisiana,Maine,Maryland,Massachusetts,Michigan,Minnesota,Mississippi,Missouri,Montana,Nebraska,Nevada,New Hampshire,New Jersey,New Mexico,New York,North Carolina,North Dakota,Ohio,Oklahoma,Oregon,Pennsylvania,Rhode Island,South Carolina,South Dakota,Tennessee,Texas,Utah,Vermont,Virginia,Washington,West Virginia,Wisconsin,Wyoming</items>
							<variable>[Listbox1]</variable>
							<init_value>Alabama</init_value>
							<multi_select>False</multi_select>
						</Listbox>
						<Paragraph id="Paragraph1">
							<left>216px</left>
							<top>408px</top>
							<width>256px</width>
							<height>120px</height>
							<style>color:#696969</style>
							<text>Static Listbox containing U.S. states. When a selection is made the name of the state is placed into the Listbox&apos;s variable.</text>
						</Paragraph>
						<Paragraph id="Paragraph2">
							<left>528px</left>
							<top>408px</top>
							<width>256px</width>
							<height>120px</height>
							<style>color:#696969</style>
							<text>Static Listbox containing U.S. states with two letter abbreviations as values. Notice that although the value is not visible on-screen it is placed into the Listbox&apos;s variable when a selection is made.</text>
						</Paragraph>
						<Listbox id="Listbox2">
							<left>528px</left>
							<top>208px</top>
							<width>152px</width>
							<height>180px</height>
							<items>Alabama|AL,Alaska|AK,Arizona|AZ,Arkansas|AR,California|CA,Colorado|CO,Connecticut|CT,Delaware|DE,Florida|FL,Georgia|GA,Hawaii|HI,Idaho|ID,Illinois|IL,Indiana|IN,Iowa|IA,Kansas|KS,Kentucky|KY,Louisiana|LA,Maine|ME,Maryland|MD,Massachusetts|MA,Michigan|MI,Minnesota|MN,Mississippi|MS,Missouri|MO,Montana|MT,Nebraska|NE,Nevada|NV,New Hampshire|NH,New Jersey|NJ,New Mexico|NM,New York|NY,North Carolina|NC,North Dakota|ND,Ohio|OH,Oklahoma|OK,Oregon|OR,Pennsylvania|PA,Rhode Island|RI,South Carolina|SC,South Dakota|SD,Tennessee|TN,Texas|TX,Utah|UT,Vermont|VT,Virginia|VA,Washington|WA,West Virginia|WV,Wisconsin|WI,Wyoming|WY</items>
							<variable>[Listbox2]</variable>
							<init_value>AL</init_value>
							<multi_select>False</multi_select>
						</Listbox>
						<Paragraph id="Paragraph3">
							<left>376px</left>
							<top>208px</top>
							<width>120px</width>
							<height>48px</height>
							<style>color:#696969</style>
							<text>You selected: [Listbox1]</text>
						</Paragraph>
						<Paragraph id="Paragraph4">
							<left>688px</left>
							<top>208px</top>
							<width>128px</width>
							<height>48px</height>
							<style>color:#696969</style>
							<text>You selected: [Listbox2]</text>
						</Paragraph>
						<Container id="Container1">
							<left>496px</left>
							<top>208px</top>
							<width>4px</width>
							<height>296px</height>
							<style>background-color:#E0E0E0</style>
						</Container>
						<Paragraph id="Paragraph7">
							<left>216px</left>
							<top>112px</top>
							<width>432px</width>
							<height>88px</height>
							<style>color:#696969</style>
							<text>The contents of this Listbox come from a simple comma delimited string&amp;nbsp;(stored in the&amp;nbsp;&apos;items&apos; property).&amp;nbsp;This is a called a&amp;nbsp;static Listbox because it cannot be easily modified at runtime.&amp;nbsp;The next page&amp;nbsp;contains&amp;nbsp;a more flexible Listbox option.</text>
						</Paragraph>
						<PushButton id="PushButton3">
							<left>936px</left>
							<top>544px</top>
							<width>72px</width>
							<height>40px</height>
							<caption>Next</caption>
							<icon>glyphicon-arrow-right</icon>
							<icon_position>pright</icon_position>
							<click>GotoNextPage</click>
						</PushButton>
						<Container id="Container2">
							<left>0px</left>
							<top>0px</top>
							<width>1024px</width>
							<height>96px</height>
							<style>background-color:#DF7326</style>
						</Container>
						<Image id="Image1">
							<left>712px</left>
							<top>8px</top>
							<width>300px</width>
							<source>visualNEO-web.png</source>
							<link>https://visualneo.com</link>
						</Image>
						<Headline id="Headline4">
							<left>24px</left>
							<top>16px</top>
							<width>304px</width>
							<height>32px</height>
							<style>color:#ffffff;font-weight:bold</style>
							<text>List Box Example 1</text>
							<kind>h3</kind>
						</Headline>
						<Container id="Container7">
							<left>816px</left>
							<top>120px</top>
							<width>184px</width>
							<height>64px</height>
							<style>color:#ffffff;background-color:#DF7326;padding-bottom:10px;padding-left:10px;padding-right:10px;padding-top:10px</style>
							<visible>False</visible>
							<html>&lt;strong&gt;Required Plugins:&lt;/strong&gt;&lt;br&gt;
&lt;i&gt;Power App&lt;/i&gt;</html>
						</Container>
					</Components>
				</Page>
				<Page id="Page2">
					<enter_effect>fadeIn</enter_effect>
					<exit_effect>fadeOut</exit_effect>
					<pageenter>slSetCSSProperty &quot;Page2&quot; &quot;border&quot; &quot;1px solid black&quot;
slSetCSSProperty &quot;Page2&quot; &quot;overflow&quot; &quot;hidden&quot;</pageenter>
					<Components>
						<Listbox id="Listbox3">
							<left>224px</left>
							<top>184px</top>
							<width>200px</width>
							<height>328px</height>
							<items>[Autos]</items>
							<variable>[Listbox3]</variable>
							<multi_select>False</multi_select>
						</Listbox>
						<PushButton id="PushButton1">
							<left>440px</left>
							<top>184px</top>
							<width>264px</width>
							<height>56px</height>
							<style>text-align:left</style>
							<caption>Populate Listbox with Sample Data&lt;br&gt;&lt;small&gt;(CreateArray)&lt;/small&gt;</caption>
							<icon>glyphicon-arrow-left</icon>
							<click>SetVar [Listbox3] &quot;Ford&quot;
CreateArray [Autos] &quot;Ford,Toyota,Honda,Jeep,Mazda,Audi,Subaru,Chevrolet,BMW,Chrysler,Fiat,Hyundai,Kia,Lexis,Volkswagen&quot;</click>
						</PushButton>
						<Paragraph id="Paragraph5">
							<left>440px</left>
							<top>264px</top>
							<width>176px</width>
							<height>24px</height>
							<text>Add an Item &lt;small&gt;(ArrayAddItem)&lt;/small&gt;</text>
						</Paragraph>
						<TextInput id="TextInput1">
							<left>440px</left>
							<top>288px</top>
							<width>184px</width>
							<height>32px</height>
							<variable>[TextInput1]</variable>
							<init_value>Tesla</init_value>
							<change>If [TextInput1] &gt; &quot;&quot;
  EnableObject &quot;PushButton2&quot;
Else
  DisableObject &quot;PushButton2&quot;
EndIf</change>
						</TextInput>
						<PushButton id="PushButton2">
							<left>632px</left>
							<top>288px</top>
							<width>72px</width>
							<height>32px</height>
							<caption>Add</caption>
							<icon>glyphicon-plus</icon>
							<kind>primary</kind>
							<size>small</size>
							<click>If [TextInput1] &gt; &quot;&quot;
  .make sure the new item isn&apos;t already in the array
  ArraySearch [Autos] &quot;[TextInput1]&quot; [Found]
  If [Found] = -1
    .not found so add the new item
    ArrayAddItem [Autos] [TextInput1]
    .select the added item
    SetVar [Listbox3] [TextInput1]
    .clear the text box
    SetVar [TextInput1] &quot;&quot;
    .disable the add button
    DisableObject &quot;PushButton2&quot;
  Else
    AlertBox &quot;Error&quot; &quot;[TextInput1] is already in the list.&quot; &quot;&quot;
  EndIf
EndIf</click>
						</PushButton>
						<PushButton id="PushButton4">
							<left>440px</left>
							<top>352px</top>
							<width>264px</width>
							<height>48px</height>
							<style>text-align:left</style>
							<caption>Remove Selected Item &lt;small&gt;(ArrayDelItem)&lt;small&gt;&lt;/small&gt;&lt;/small&gt;</caption>
							<icon>glyphicon-trash</icon>
							<kind>danger</kind>
							<click>If [Listbox3] &gt; &apos;&apos;
  .find the index in the array of the selected item
  ArraySearch [Autos] &quot;[Listbox3]&quot; [Found]
  If [Found] &gt; -1
    ArrayDelItem [Autos] [Found]
    .selected item is gone so something else
    ArrayLen [Autos] [Len]
    If [Len] = 0
      .array is empty so delete the ListBox variable otherwise AngularJS will add an empty item to the ListBox :(
      DeleteVar [Listbox3]
    Else
      .select the item after the one we deleted
      If [Found] &lt; [Len]
        SetVar [Listbox3] [Autos([Found])]
      Else
        SetVar [Listbox3] [Autos([Len]-1)]
      EndIf
    EndIf
  EndIf
EndIf</click>
						</PushButton>
						<PushButton id="PushButton5">
							<left>440px</left>
							<top>408px</top>
							<width>264px</width>
							<height>48px</height>
							<style>text-align:left</style>
							<caption>Sort List &lt;small&gt;(ArrayAlphaSort)&lt;/small&gt;</caption>
							<icon>glyphicon-sort-by-alphabet</icon>
							<click>.sort the contents of the array alphabetically
ArrayAlphaSort [Autos]</click>
						</PushButton>
						<PushButton id="PushButton6">
							<left>440px</left>
							<top>464px</top>
							<width>264px</width>
							<height>48px</height>
							<style>text-align:left</style>
							<caption>Reverse List Order &lt;small&gt;(ArrayReverse)&lt;/small&gt;</caption>
							<icon>glyphicon-retweet</icon>
							<click>.reverse the order of the items in the array (cool!)
ArrayReverse [Autos]</click>
						</PushButton>
						<PushButton id="PushButton8">
							<left>16px</left>
							<top>544px</top>
							<width>72px</width>
							<height>40px</height>
							<caption>Prev</caption>
							<icon>glyphicon-arrow-left</icon>
							<click>GotoPrevPage</click>
						</PushButton>
						<PushButton id="PushButton7">
							<left>936px</left>
							<top>544px</top>
							<width>72px</width>
							<height>40px</height>
							<enabled>False</enabled>
							<caption>Next</caption>
							<icon>glyphicon-arrow-right</icon>
							<icon_position>pright</icon_position>
							<click>GotoNextPage</click>
						</PushButton>
						<Container id="Container3">
							<left>0px</left>
							<top>0px</top>
							<width>1024px</width>
							<height>96px</height>
							<style>background-color:#DF7326</style>
						</Container>
						<Image id="Image2">
							<left>712px</left>
							<top>8px</top>
							<width>300px</width>
							<source>visualNEO-web.png</source>
							<link>https://visualneo.com</link>
						</Image>
						<Headline id="Headline1">
							<left>24px</left>
							<top>16px</top>
							<width>304px</width>
							<height>32px</height>
							<style>color:#ffffff;font-weight:bold</style>
							<text>List Box Example 2</text>
							<kind>h3</kind>
						</Headline>
						<Paragraph id="Paragraph8">
							<left>224px</left>
							<top>128px</top>
							<width>680px</width>
							<height>56px</height>
							<style>color:#696969</style>
							<text>The contents of this Listbox come from an array variable (look at&amp;nbsp;the &apos;items&apos; property).&amp;nbsp;To add or remove&amp;nbsp;something&amp;nbsp;from the ListBox all you need to do is modify the array.</text>
						</Paragraph>
					</Components>
				</Page>
			</Components>
		</PageList>
		<PageList name="Master">
			<Components>
				<Page id="MasterPage"/>
			</Components>
		</PageList>
		<PageList name="Dialog">
			<Components>
				<Page id="NewDialog">
					<Components>
						<DialogContainer id="DialogContainer1">
							<left>0px</left>
							<top>0px</top>
							<width>640px</width>
							<height>480px</height>
							<close_button>False</close_button>
						</DialogContainer>
					</Components>
				</Page>
			</Components>
		</PageList>
	</Components>
</Application>
