opendialog

Electron: dialog.showOpenDialog not returning a promise?

巧了我就是萌 提交于 2020-07-06 11:23:29
问题 I would like to show an Open Dialog box from within a rendered script. I am getting conflicting information from different sources, but, as far as I can tell, the documentation at https://electronjs.org/docs/api/dialog suggests I should be able to use: const dialog = require('electron').remote.dialog; dialog.showOpenDialog({ title: '…', defaultPath: '…' }) .then(data=>console.log(data)); The error message I get is: TypeError: dialog.showOpenDialog(...).then is not a function That suggests

Electron: dialog.showOpenDialog not returning a promise?

╄→гoц情女王★ 提交于 2020-07-06 11:23:20
问题 I would like to show an Open Dialog box from within a rendered script. I am getting conflicting information from different sources, but, as far as I can tell, the documentation at https://electronjs.org/docs/api/dialog suggests I should be able to use: const dialog = require('electron').remote.dialog; dialog.showOpenDialog({ title: '…', defaultPath: '…' }) .then(data=>console.log(data)); The error message I get is: TypeError: dialog.showOpenDialog(...).then is not a function That suggests

Delphi - how to get a list of all files of directory

别来无恙 提交于 2020-01-12 06:36:09
问题 I am working with delphi, I want a list of all files of a directory when I execute openpicturedialog. i.e., When open dialog is executed and i select one file from it, I want the list of all files from the directory of selected file. You can even suggest me for getting directory name from FileName property of TOpenDialog Thank You. 回答1: @Himadri, the primary objective of the OpenPictureDialog is not select an directory, anyway if you are using this dialog with another purpose you can try this

how to change the language of opendialog in winforms?

风格不统一 提交于 2019-12-24 11:28:52
问题 i write a program and wnat to get the opendialog that open in my language i try to change culture ui but it doesn't cahnge the english layout can someone know how to change it? OpenFileDialog openFileDialog1 = new OpenFileDialog(); 回答1: OpenFileDialog is a wrapper for a native Windows dialog. You'll also see it when you use Notepad's File + Open command for example. All native Windows windows are localized by the resource tables that are built into Windows itself. They are quite large, about

Disable MDI Parent when Child is Active

情到浓时终转凉″ 提交于 2019-12-20 05:45:56
问题 I menu strip in my software and when users click on about I want to open the another child window but I want to make the the parent window disabled which means only by closing or clicking kk make it available again. My current code opens the form but does not make the parent disable if (about == null) { about = new aboutForm(); about.ShowDialog(this); } I tried about.ShowDialog(); it's throws a error I appreciate any answers possible code solutions 回答1: Condition is not required because

Delphi 7 - Embedded file open dialog in a form

自闭症网瘾萝莉.ら 提交于 2019-12-07 21:35:50
问题 Does anyone know if it is possible to embed a file open dialog inside your own form? We have a tabbed dialog and on one of the tabs we want the user to be able to browse for a file with the same functionality as the the standard open dialog e.g. 'Look in' combobox, places bar, shell file list, file name comboedit with name completion etc etc. I've looked at recreating the dialog with some 3rd party components, namely Jam Shell Browser Components I can get most of the functionality this way,

Delphi 7 - Embedded file open dialog in a form

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-06 11:25:21
Does anyone know if it is possible to embed a file open dialog inside your own form? We have a tabbed dialog and on one of the tabs we want the user to be able to browse for a file with the same functionality as the the standard open dialog e.g. 'Look in' combobox, places bar, shell file list, file name comboedit with name completion etc etc. I've looked at recreating the dialog with some 3rd party components, namely Jam Shell Browser Components I can get most of the functionality this way, but I'm missing a couple of things e.g. the places bar and the filename auto completion\suggestion utku

Delphi - how to get a list of all files of directory

谁说胖子不能爱 提交于 2019-12-03 09:59:17
I am working with delphi, I want a list of all files of a directory when I execute openpicturedialog. i.e., When open dialog is executed and i select one file from it, I want the list of all files from the directory of selected file. You can even suggest me for getting directory name from FileName property of TOpenDialog Thank You. RRUZ @Himadri, the primary objective of the OpenPictureDialog is not select an directory, anyway if you are using this dialog with another purpose you can try this code. Var Path : String; SR : TSearchRec; DirList : TStrings; begin if OpenPictureDialog1.Execute then

Disable MDI Parent when Child is Active

拟墨画扇 提交于 2019-12-02 10:15:58
I menu strip in my software and when users click on about I want to open the another child window but I want to make the the parent window disabled which means only by closing or clicking kk make it available again. My current code opens the form but does not make the parent disable if (about == null) { about = new aboutForm(); about.ShowDialog(this); } I tried about.ShowDialog(); it's throws a error I appreciate any answers possible code solutions Condition is not required because ShowDialog(this) would show modal dialog. aboutForm about = new aboutForm(); about.ShowDialog(this); In aboutForm