﻿Version=6.80
NumberOfForms=1
Form1=Form1
FormWidth=238
FormHeight=268
IconFile=
NumberOfDesktopIncludes=0
NumberOfDeviceIncludes=0
NumberOfObjects=0
NumberOfModules=0
Sub designer
addform(Form1,"Form1","",220,220,220)@
addlabel(form1,lb,5,5,230,45,"",220,220,220,0,0,0,True,True,12,False)@
addtable(form1,Table1,205,145,20,25,"",245,245,245,0,0,0,True,False,9)@
addlabel(form1,Label1,65,5,125,25,"",220,220,220,0,0,0,True,True,11,False)@
addbutton(form1,Button1,80,115,50,23,"Add",212,208,200,0,0,0,True,True,9)@
addtextbox(form1,a,5,65,75,22,"",255,255,255,0,0,0,True,True,False,9)@
addcombo(form1,cb,130,65,105,22,"",255,255,255,0,0,0,True,True,4,"a","c","b","d",9)@
End Sub
@EndOfDesignText@
Sub Globals
	'Declare the global variables here.
End Sub

Sub App_Start
	Form1.Show
	a.Focus
	Table1.AddCol(cString,"sort",1)
	Table1.TableSort("sort ASC")
	ErrorLabel (NoComboSave) ' dealing with a non existent ComboSave.dat
	Table1.LoadCSV(AppPath & "\ComboSave.dat", ",", False, False)
	UpdateCombo
	NoComboSave:	
End Sub

Sub Form1_Close
	' when the application gets closed, the main form gets closed
	Table1.SaveCSV(AppPath & "\ComboSave.dat", ",", False)
End Sub

Sub Button1_Click
	Table1.AddRow(a.Text)
	a.Text = ""
	UpdateCombo
	a.Focus
End Sub

Sub UpdateCombo
	cb.Clear
	For j = 0 To Table1.RowCount-1
  		cb.Add(Table1.Cell("sort",j))
	Next
End Sub