fileopendialog

OpenDialog does not show up in Delphi MultiThreaded application

99封情书 提交于 2019-12-04 16:43:49
i tried to use the openDialog in new thread but it made so strange behavior .. if i put the if opendialog.execute then in the create constructor like this : constructor TChatMemberThread.Create(Name: string); begin inherited Create(True); FName := Name; FreeOnTerminate := True; Opendialog := TOpenDialog.create(nil); if opendialog.execute then for 0 to opendialog.filescount do somecodeishere end; end; the opendialog open normally but when i put it in the execute producer of the thread it didn't open at all !! i'm so beginner in threads so can any one explain for me what happened ? Thanks in

How do I present an open folder selection dialog in Perl?

旧城冷巷雨未停 提交于 2019-12-03 20:26:14
How do I open folder selection dialog in Perl? Depends on the GUI system you're using, and perhaps the platform. For example, on Windows and using Win32::GUI , you can use GetOpenFileName : # $main is your main window... $my_file = $main->GetOpenFileName( -title => 'Select a file...', -file => 'default.file', ); Most portable (at least compared to ot he rs ): use Tk; my $dir = Tk::MainWindow->new->chooseDirectory; Of course, if you're actually using Tk in the rest of your program, you should call chooseDirectory on a proper parent widget instead of the one constructed and destructed here. You

Regular Expression Filter for QFileDialog

懵懂的女人 提交于 2019-12-02 10:14:53
I would like to display a file open dialog that filters on a particular pattern, for example *.000 to *.999 . QFileDialog::getOpenFileNames allows you to specify discrete filters, such as *.000 , *.001 , etc. I would like to set a regular expression as a filter, in this case ^.*\.\d\d\d$ , i.e. any file name that has a three digit extension. ariwez It can be done by adding proxy model to QFileDialog. It is explained here: Filtering in QFileDialog ariwez pointed me into the right direction. The main thing to watch out for is to call dialog.setOption(QFileDialog::DontUseNativeDialog) before

Filter files in HTML file open dialog

泄露秘密 提交于 2019-12-01 09:10:01
I am working with file upload to the server using HTML tag: <input type="file"> When I click on the browse button it shows me a file open dialog. Can I filter the files by passing the extension filter to that dialog? Like we can do in .Net framework's file open dialog by passing some thing like: Text files *.txt|.txt Using this filter we can only open .txt files. Other files not shown to the user. Is there any option for this dialog? Standard Actually in HTML5 you can set the accept attribute so now this is possible! The W3C standard states: The accept attribute may be specified to provide

OpenDialog for WPF

和自甴很熟 提交于 2019-12-01 02:43:38
I just started with WPF. Moved from Window Form. Where do those openDialog, saveDialog gone? And a bunch of stuff. Arsen Mkrtchyan Look in Microsoft.Win32 namespace OpenFileDialog openDialog = new OpenFileDialog(); if (openDialog.ShowDialog().Value) { .......... } And the same for SaveFileDialog SaveFileDialog saveDialog = new SaveFileDialog(); if (saveDialog.ShowDialog().Value) { .......... } 来源: https://stackoverflow.com/questions/1339783/opendialog-for-wpf

OpenDialog for WPF

可紊 提交于 2019-11-30 21:33:47
问题 I just started with WPF. Moved from Window Form. Where do those openDialog, saveDialog gone? And a bunch of stuff. 回答1: Look in Microsoft.Win32 namespace OpenFileDialog openDialog = new OpenFileDialog(); if (openDialog.ShowDialog().Value) { .......... } And the same for SaveFileDialog SaveFileDialog saveDialog = new SaveFileDialog(); if (saveDialog.ShowDialog().Value) { .......... } 来源: https://stackoverflow.com/questions/1339783/opendialog-for-wpf

How to use native android file-open-dialog?

不问归期 提交于 2019-11-29 22:28:28
I've seen this dialog to pick/open a file on android in some apps and it seems to me as the native one. But I can't find a way to use it in my own apps. The language of the attached screenshot is German, but I'm sure someone will recognize it. Screenshot of the file-dialog Jordan Junior You can use the intent ACTION_GET_CONTENT with the MIME type */* . It will return the URI in onActivityResult() @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Intent intent = new Intent() .setType("*/*") .setAction

Is there a way to choose which files are displayed to the user via the standard OPENFILE dialogs?

家住魔仙堡 提交于 2019-11-29 15:44:45
Vista introduced an interface: IFileDialog::SetFilter, which allows me to setup a filter that will be called for every potential filename to see if it should be shown to the user. Microsoft removed that in Windows 7, and didn't support it in XP. I am trying to customize the our Open file dialog so that I can control which files are displayed to the end user. These files are marked internally with a product-code - there isn't anything in the filename itself to filter on (hence file extension filters are not useful here -= I need to actually interrogate each one to see if it is within the extra

JFileChooser embedded in a JPanel

情到浓时终转凉″ 提交于 2019-11-29 10:04:36
I am writing a java program that needs a file open dialog. The file open dialog isn't difficult, I'm hoping to use a JFileChooser . My problem is that I would like to have a dual pane JFrame (consisting of 2 JPanels ). The left panel would have a JList , and the right panel would have a file open dialog. When I use JFileChooser.showOpenDialog() this opens the dialog box above all other windows, which isn't what I want. Is there any way to have the JFileChooser (or maybe another file selection dialog) display inside a JPanel and not pop-up above it? Here is the code that I've tried, at this

VBA: Get Excel FileDialogOpen to point to “My Computer” by default

纵然是瞬间 提交于 2019-11-29 08:04:15
I'm trying to get excels save and open dialog boxes to open to "my computer" by default so the user can select a drive from there. I have got the dialog boxes to open to any path on any drive or my documents etc but can't seem to find a way for it to open to my computer. This is the code i'm using at the moment and it works fine for a known path: MsgBox objFolders("desktop") ChDrive objFolders("desktop") ChDir objFolders("desktop") strFileName = appRemoteApp.Workbooks("Export Template.xlsm").Application.GetSaveAsFilename(objFolders("desktop") & "\Replica Export " & UserName & " " & Format(Date