Hi all,
I have a button in my Pane that opens a dialog to choose a folder in my filesystem. I want the folder path to be stored in a text input, so that when the user presses save, this value is included in pane.exportPreset()
This is the way I managed to do it, by rummaging through the source code:
...
const folder_location = pane.addInput(PARAMS, 'folder_location');
const btn = pane.addButton({
title: 'Select Folder',
});
btn.on('click', () => {
(<this handles the dialog>).then(result => {
folder_location.controller_.binding.value.rawValue = result
});
});
It feels like there is probably a more direct way to change the input value than .controller_.binding...
but I couldn't figure it out. the value
setter didn't work for me (folder_location.value = ...
)
Any thought would be greatly appreciated. Thank you
Owner Name | cocopon |
Repo Name | tweakpane |
Full Name | cocopon/tweakpane |
Language | TypeScript |
Created Date | 2016-05-10 |
Updated Date | 2023-03-17 |
Star Count | 2603 |
Watcher Count | 19 |
Fork Count | 71 |
Issue Count | 11 |
Issue Title | Created Date | Updated Date |
---|