File picker for Makie

hello, i’m new to Makie and i’m trying to build a GUI to plot data from a CSV file.
to load the file i want the user to choose a CSV and then pars the data to the plot.
i was looking for something like the “filepicker” from the “interact.jl” pkg. but didn’t find one.
can i implement the filepicker from interact with in the Makie Scene?
if not then how can i create a gui to load a CSV file using Makie?
thanks in ahead

1 Like

I’m curious, did you end up finding a suitable file picker?

It been a while, but recently I got back to this issue and my workaround for this was as follow:
for windows I created a .bat file with the following code:

@echo off
set dialog="about:<input type=file id=FILE><script>;new ActiveXObject
set dialog=%dialog%('Scripting.FileSystemObject').GetStandardStream(1).WriteLine(FILE.value);
set dialog=%dialog%close();resizeTo(0,0);</script>"

for /f "tokens=* delims=" %%p in ('mshta.exe %dialog%') do set "file=%%p"
echo %file%

finally I created the following julia functions:

abstract type SysTypes end
struct Windows <: SysTypes end
struct Linux <: SysTypes end

function filebrowser()
    if Sys.iswindows()
        res = filebrowser(Windows)

    if Sys.islinux()
        res = filebrowser(Linux)
    return res

function filebrowser(::Type{Windows})
    filetorun = joinpath(@__DIR__,"../aux_files/fileBrowserWindows.bat")
    filename = String(read(`$filetorun`))
    return splitdir(strip(filename,['\r','\n']))

function filebrowser(::Type{Linux})
    comm = `zenity --file-selection`
    filename = String(read(comm))
    return splitdir(strip(filename,['\n']))

hope it is still relevant and help you.

1 Like

That’s great!