A file/folder menu structure

Docking/MDI for Windows Forms Forum

Posted 17 years ago by Kasper
Version: 2.0.77
Avatar
Hi,

I have a menu where I would like to show a folder-like structure, that is, items which have subitems which have subitems which... and so on, based on the folder structure of a specific folder. I have a BarExpanderButtonCommand where I create BarPopupButtonCommand's for folders and BarButtonCommand for files. This works fine. However, once I get to adding the second level of folders and files, I'm stuck. I no longer have a BarExpanderButtonCommand to add to, and adding to the DefaultCommandLinks of the BarPopupButtonCommand doesn't work. I'm sure there are some smart way to do this, I just really can't figure it out right now hehe :).

I am using a recursive function to add folders and files, of course.

Comments (5)

Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Kasper,

Use an expander as the single child of the popup you add for folders. That way if the folder is expanded the expander can be replaced with all the files/folders in that parent folder. If you do this recursively it should work.


Actipro Software Support

Posted 17 years ago by Kasper
Avatar
I actually already tried that, but it didn't seem to work. Should I add the Expander to the DefaultCommandLinks of the Popup? I think that's what I did, but nothing turned up.
Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
I would put it on the regular CommandLinks collection. The expander should expand whenever the popup is displayed.


Actipro Software Support

Posted 17 years ago by Kasper
Avatar
Yes that's what I thought as well, but I can't seem to find such a property on the BarPopupButtonCommand - am I doing something wrong? :)
Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
You'd have to put it on the popup's link since that is what has the instance command links collection.


Actipro Software Support

The latest build of this product (v24.1.0) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.