FileDialog as Save As dialog [message #450890] |
Sun, 20 February 2005 00:06 |
Eclipse User |
|
|
|
Originally posted by: bob.objfac.com
This came up in the rcp group. Thought someone here might have some advice.
David Beers wrote:
> What about using org.eclipse.swt.widgets.FileDialog?
A great suggestion. The only problem with FileDialog when used for Save
As is it doesn't complain if the file already exists, so if you want
confirmation you have to do it when the dialog is dismissed and put it
up again if the user Cancels. Minor, but UI is all about attention to
detail. Anyone know a way to get FileDialog to cooperate?
Bob Foster
|
|
|
|
Re: FileDialog as Save As dialog [message #451030 is a reply to message #451007] |
Tue, 22 February 2005 00:43 |
Eclipse User |
|
|
|
Originally posted by: bob.objfac.com
Thanks. I guess I should put in a feature request. Hopefully, there is a
way to do this on every platform.
Bob
Tiberiu Caprita wrote:
> Bob Foster wrote:
>
>> This came up in the rcp group. Thought someone here might have some
>> advice.
>
>
>> David Beers wrote:
>
>
>> > What about using org.eclipse.swt.widgets.FileDialog?
>
>
>> A great suggestion. The only problem with FileDialog when used for
>> Save As is it doesn't complain if the file already exists, so if you
>> want confirmation you have to do it when the dialog is dismissed and
>> put it up again if the user Cancels. Minor, but UI is all about
>> attention to detail. Anyone know a way to get FileDialog to cooperate?
>
>
>> Bob Foster
>
> Hi Bob,
> according to MSDN, the behaviour you want is obtained when OPENFILENAME
> has the following style set:
> "
> OFN_OVERWRITEPROMPT
> Causes the Save As dialog box to generate a message box if the selected
> file already exists. The user must confirm whether to overwrite the file.
> "
>
> It seems SWT doesn't give you much flexibility here. You have to hack
> the FileDialog in a way. Take a look of FileDialog code and choose the
> better place to change it...
>
> Regards,
> Tiberiu
>
>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.04391 seconds