Notifications
Clear all

[Closed] filepath picker?

I’ve looked in the maxhelp under [color=white]Rollout User-Interface Control Types, [/color]but can’t seem to find any reference to a rollout element that will allow me to define a filepath without using a edittext and entering it manually. I’m sure there has to be a way to do this. I want it to have a button that I click that will open a dialog and let me navigate to a path and click OK and be able to use this path a a string.

Cheers,

Cg.

3 Replies

There isn’t a built-in control to do that. You have to create it.
One solution is to use an edit text and a button. When the user pick the button, display a getSavePath and set the filenpath to the edit text if the dialog isn’t cancelled.

I use a button that displays the getsavepath dialog, and then I change the button text to the result.


rollout MyRollout "MyRollout" width:178 height:340
(
button ad "Choose source directory:" width:260 fieldWidth:1 align:#right
on ad pressed do
(
x=getsavepath caption:"My directory:"
ad.text=x
)
)
newroll=newrolloutfloater "My Floater." 300 65 150 80
addrollout MyRollout newroll

< :

Josh.

I very much appreciate your answers.

Cheers,

Cg.