Project

General

Profile

Browse for Folder

Added by Jonathan Lim over 14 years ago

Hi

I would like to ask if there is a way for Wt to present a Browse for Folder (SHBrowseForFolder) dialog box on the client-side? Something like what the WFileUpload does but instead it should show server-side folders, is that possible?

Thank you very much!

JLim


Replies (6)

RE: Browse for Folder - Added by Wim Dumon over 14 years ago

Hello Jonathan,

Such widget is not provided in the library core, but the file treeview example in the examples folder does exactly that. You'll probably be able to reuse large parts of it and adapt it to your specific needs.

Regards,

Wim.

RE: Browse for Folder - Added by Jonathan Lim over 14 years ago

Hi

Thank you very much for the response. I guess I have no choice, actually I had already created a custom browser based on, as you have mentioned, the filetreeview example, but I was kind of hopeful that there was an easier way. One last question, although it is not exactly related to the topic of my post, is there a way for me to change the default content alignment, wherein every widget is added on top of one another, and put them side by side instead? Or do I really have to use a table?

Cheers!

JLim

RE: Browse for Folder - Added by Wim Dumon over 14 years ago

Jonathan,

Unfortunately we can't have every widget for every occasion ;-) I once modified the filetreeview example to display image files with thumbnails, which was a pretty straight-forward modification. The annoying part, navigating through the directory structure in a cross-platform way and mapping this to the treeview, is already present in the example.

With respect to the alignment of widgets: have you tried setInline(true)? This creates inline widgets (inline as in the CSS lingo), which means they will be put one next to the other.

Wim.

RE: Browse for Folder - Added by Jonathan Lim over 14 years ago

Hi

Unfortunately I'm not much of a web developer so CSS lingoes are alien to me. :) Although at your suggestion, I did try enabling the Inline option but it doesn't seem to do anything, all the widgets I've added (either into a container widget or panel respectively) are still being pushed vertically. Do I need to make adjustment to content alignment as well?

Many thanks!

JLim

RE: Browse for Folder - Added by Wim Dumon over 14 years ago

WHBoxLayout shall be your friend.

RE: Browse for Folder - Added by Jonathan Lim over 14 years ago

Cool. I'll give it a go and have a play with it. Thank you very much! :)

    (1-6/6)