New to B4PPC and no doubt there's a very simple answer...
I want to populate a combo box with a list of files from a given directory, let's say "C:\Files\Data\", the files will have a set file extension, let's say "*.cog".
When the file is selected the contents are used within the program; I'm happy with doing that bit.
It's the combo box option I'm after and not going down the file explorer route.
Here:
Add a ComboBox named ComboBox1 and an ArrayList named ArrayList1.
B4X:
Sub Globals
'Declare the global variables here.
End Sub
Sub App_Start
Form1.Show
FileSearch(ArrayList1, "c:\Files\Data", "*.cog")
For i = 0 To ArrayList1.Count - 1
ComboBox1.Add(FileName(ArrayList1.Item(i)))
Next
End Sub