by m.Th. (Posted Sun Jan 29, 2017 3:55 pm)
Already discussed partially at viewtopic.php?f=60&t=28297 but there we deviated to two-panels browser paradigm.
WRT to:
„the absence of drag & drop engine like in the main Tree Pane”
Pierre should make the Favorites Pane a drop target (super-easy - usually is a property/handler of the Widget) and then have a method/procedure like
In this way, the same code which he use for drag&drop in Folders Tree will be used in Favorites Tree because the aTargetPath is abstract (doesn't matter from where it comes) - ok, he can pass the entire widget as an argument because after this he should handle the node change (if any) in Favorites Pane to correctly refresh the Tree.
„the absence of the same menu items(*) from the main Tree Pane”
Here is to add the same menu entries from Tree Pane and pass as parameter the current path (or the entire widget) from Favorites Pane. Again, take care at tree refresh because some primitives requires it.
Pierre has done this work for the main tree. If he was careful to maintain the separation between GUI and code he can easily add the code to another tree(s).
This is what you wanted?
Read Main Topic
Could you perhaps precise your suggestion? A detailed specification would be a good base for further discussions and make Pierre's life easier.
Already discussed partially at viewtopic.php?f=60&t=28297 but there we deviated to two-panels browser paradigm.
WRT to:
„the absence of drag & drop engine like in the main Tree Pane”
Pierre should make the Favorites Pane a drop target (super-easy - usually is a property/handler of the Widget) and then have a method/procedure like
- Code: Select all
DropListOfFiles(aTargetPath: string; aListOfFiles:TFilePaths);
In this way, the same code which he use for drag&drop in Folders Tree will be used in Favorites Tree because the aTargetPath is abstract (doesn't matter from where it comes) - ok, he can pass the entire widget as an argument because after this he should handle the node change (if any) in Favorites Pane to correctly refresh the Tree.
„the absence of the same menu items(*) from the main Tree Pane”
Here is to add the same menu entries from Tree Pane and pass as parameter the current path (or the entire widget) from Favorites Pane. Again, take care at tree refresh because some primitives requires it.
Pierre has done this work for the main tree. If he was careful to maintain the separation between GUI and code he can easily add the code to another tree(s).
This is what you wanted?
Read Main Topic