' initialize the control, we want to trap file selected of "PropertyBag", this event does not show in the designer, so type it in
clsTableView.Initialize(tblView, Me, "PropertyBag")
'you can specify any valid date format for the date picker control.
clsTableView.DateFormat = "yyyy-MM-dd"
' set folder to look for images from
clsTableView.ImagesFolder = File.DirApp
'make it a property bag: tell it to have three columns, Property, Value and Description
clsTableView.SetPropertyViewer
'hide the description column, if you want
'clsTableView.HideColumn("Description")
'same as tableview set columns, this specifies sortable, widths, etc. Remember there is only 3 columns for now with default properties
clsTableView.SetColumns
' add a property for first name, the content here will be a textbox, the last variable passed here is the map property to store the content
clsTableView.AddTextBoxProperty("First Name", "", "First Name of a person", "FirstName")
' add a propert for last name
clsTableView.AddTextBoxProperty("Last Name", "", "Last Name of a person", "LastName")
Dim xl As List
xl.Initialize
xl.Add("Male")
xl.Add("Female")
' what is the gender of the person
clsTableView.AddComboBoxProperty("Gender", "Male", "The gender of the person", "ActionButton", xl)
clsTableView.AddDatePickerProperty("Date of Birth","","The date of birth", "DateOfBirth")
clsTableView.AddColorPickerProperty("Eye Color", fx.Colors.Green, "The eye color of the person", "EyeColor")
clsTableView.AddCheckBoxProperty("Living", "1", "Is the person living", "Living")
clsTableView.AddFilePickerProperty("Profile Picture","","Profile Picture","ProfilePicture")
clsTableView.AddLabelProperty("End of Record","*****","End of record","eof")
'this just for demonstrating how to set individual properties
' set the external combo box to property values
jMash.ComboBoxFromList(cboProperty,clsTableView.PropertyNames,True)
' set existing file to property bag, you can save your map as a table record and read it to the property bag
Dim OrMap As Map
Dim OrName As String
OrName = "AneleMbanga.map"
If File.Exists(File.DirApp,OrName) Then
OrMap = File.ReadMap(File.DirApp,OrName)
Log(OrMap)
clsTableView.SetPropertyBag(OrMap)
End If