Home » Eclipse Projects » Standard Widget Toolkit (SWT) » any widget for file viewing?
| | |
Re: any widget for file viewing? [message #635094 is a reply to message #635064] |
Mon, 25 October 2010 15:19 |
Grant Gayed Messages: 2150 Registered: July 2009 |
Senior Member |
|
|
I see, so you mean the native file dialog, but in a Control rather than in a
stand-alone OS dialog? If so then no, this does not exist. I think it was
previously requested in bugzilla, but could not be implemented due to lack
of native support.
Implementing this functionality yourself is reasonably straight-forward
though, and there's an swt example you can look at that does this. It's
called FileViewer and it's in the swt examples download. For instructions
on getting the swt examples see http://www.eclipse.org/swt/examples.php .
If for some reason you have problems getting the examples then the two
classes that make up this example are directly accessible via the links
below, you'll just need to hack them to not depend on the additional
external strings and icons that are usually part of the example.
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org. eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer /FileViewer.java
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org. eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer /IconCache.java
HTH,
Grant
<lqb@yomolo.com> wrote in message news:ia45c3$li1$1@news.eclipse.org...
> Sorry to explain me so so sooo confusing... I meant, file browsing, like
> if it was an explorer.exe. List all the files and navigate through folders
> and pick up one file...
>
>
> Grant Gayed wrote on Mon, 25 October 2010 10:34
>> If you're asking if there's a control for showing any file with any
>> arbitrary type, then no this doesn't exist. You can use the Program
>> class to look up the viewer/editor associated with a file type, and if
>> one is found then you can launch it externally with the content to show
>> (Program snippets: http://www.eclipse.org/swt/snippets#program ).
>>
>> If this is not what you were asking then please follow up.
>>
>> Grant
>>
>>
>> <lqb@yomolo.com> wrote in message news:i9p8fq$jg7$1@news.eclipse.org...
>> > Hi,
>> >
>> > Is there any SWT widget for file viewing, i mean not any file dialog
>> > but a viewer being integrated in my app...
>> >
>> > Thanks!
>
>
|
|
|
Re: any widget for file viewing? [message #635098 is a reply to message #635094] |
Mon, 25 October 2010 15:53 |
Ruben Perez Messages: 10 Registered: February 2010 |
Junior Member |
|
|
Thanks!
I figured there wouldn't exist. That's what i was looking for, i'll implement a widget, when it's done i'll post it on sourceforge... Thanks for your help!
Grant Gayed wrote on Mon, 25 October 2010 11:19 | I see, so you mean the native file dialog, but in a Control rather than in a
stand-alone OS dialog? If so then no, this does not exist. I think it was
previously requested in bugzilla, but could not be implemented due to lack
of native support.
Implementing this functionality yourself is reasonably straight-forward
though, and there's an swt example you can look at that does this. It's
called FileViewer and it's in the swt examples download. For instructions
on getting the swt examples see http://www.eclipse.org/swt/examples.php .
If for some reason you have problems getting the examples then the two
classes that make up this example are directly accessible via the links
below, you'll just need to hack them to not depend on the additional
external strings and icons that are usually part of the example.
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org. eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer /FileViewer.java
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org. eclipse.swt.examples/src/org/eclipse/swt/examples/fileviewer /IconCache.java
HTH,
Grant
<lqb@yomolo.com> wrote in message news:ia45c3$li1$1@news.eclipse.org...
> Sorry to explain me so so sooo confusing... I meant, file browsing, like
> if it was an explorer.exe. List all the files and navigate through folders
> and pick up one file...
>
>
> Grant Gayed wrote on Mon, 25 October 2010 10:34
>> If you're asking if there's a control for showing any file with any
>> arbitrary type, then no this doesn't exist. You can use the Program
>> class to look up the viewer/editor associated with a file type, and if
>> one is found then you can launch it externally with the content to show
>> (Program snippets: http://www.eclipse.org/swt/snippets#program ).
>>
>> If this is not what you were asking then please follow up.
>>
>> Grant
>>
>>
>> <lqb@yomolo.com> wrote in message news:i9p8fq$jg7$1@news.eclipse.org...
>> > Hi,
>> >
>> > Is there any SWT widget for file viewing, i mean not any file dialog
>> > but a viewer being integrated in my app...
>> >
>> > Thanks!
>
>
|
|
|
|
Goto Forum:
Current Time: Thu Apr 18 22:58:02 GMT 2024
Powered by FUDForum. Page generated in 0.02053 seconds
|