Here is the sample code for anyone else looking to edit a picture based on a list of picture files presented in a PopupMenu the user selects from:
Var myPicture As FolderItem = App.ExecutableFile.Parent.Child("pics").Child(PopupMenu1.SelectedRow)
If myPicture <> Nil AND myPicture.Exists Then
Try
Var pic1 As Picture
pic1 = Picture.Open(myPicture)
ContainerControl.BevelButton1.Icon = pic1
Catch e As RuntimeException
App.errorString = Str(e.ErrorNumber) + " - " + e.Message
App.ErrorHandlerMethod
End Try
End If
The PopupMenu has an Open Event Handler and the code is:
Var f As FolderItem = App.ExecutableFile.Parent.Child("pics")
If f.Exists Then
Try
For Each fileListItem As FolderItem In f.Children
PopupMenu1.AddRow(fileListItem.Name)
Next
Catch e As RuntimeException
App.errorString = Str(e.ErrorNumber) + " - " + e.Message
App.ErrorHandlerMethod
End Try
End If
Hope this helps!