I would like to show the selected image ( .png .jpg - etc ) as "ICON"
as can be seen below :
Dim ICON As Bitmap
Icon.Initialize(File.DirAssets, "android48.png")
Dim Action As Int = FileDialog1.Show("Select a file:", "OK", "Cancel", "", ICON)
When the textbox shows its name (file name), and before (OK, Cancel) button is pressed.
Replacing the ICON with the updated image, or create another view for it.
I thought a small change (Dialogs lib v2.94) is needed to show the selected image.
FileExplorer v21 is quite "heavy" for this task and uses:
Animation lib
Reflection lib
ScrollView2D lib
I found Treeview Class (Tree and Node) written by Derez works fine with the minimal change! (In blue)
Now, I can see the image before it selected!
Just in case anyone is interested:
Main:
'here if you want to put the specific icon of the file as a bitmap,
'create a map of all file extensions and their icons, then check the extension of st and set : da.imgflag = 4 : da.bmp = [icon]
Da.imgflag = tr.FILE_IMG Da.imgdir = dir
Da.imgfile = st
Log(dir & " : " & st) ' just 4 test
Tree module:
Case FILE_IMG ' =2
tbmp = fileimg If Da.imgfile.EndsWith(".jpg") OR Da.imgfile.EndsWith(".png") Then
Private bfile_pic As Bitmap
Private ListFiles As ListView
'Initialize the icons
bfile_pic.Initialize(File.DirAssets, "file_pic.png")
'Then, use the icons
ListFiles.AddTwoLinesAndBitmap2("File Name", "File Type", FileIco, "File Name")
I thought a small change (Dialogs lib v2.94) is needed to show the selected image.
FileExplorer v21 is quite "heavy" for this task and uses:
Animation lib
Reflection lib
ScrollView2D lib