I was wondering if there is a drag-able tab-like control out there…
In software like Photoshop there are quite a few panels with tabs that can be dragged to change the workspace. I have been thinking about making these kind of panels myself, based on container controls.
But why re-invent the wheel if there like this is already out there.
[quote=420855:@brian franco]Bkeeney Software has a Tab Control Tab Control
Maybe check it and see if it is what you are looking for[/quote]
Our BKS Tab Control currently does not have drag reordering of tabs. BUT, we are looking into how hard it would be to add it. Probably won’t get to it today but you never know.
I downloaded the demo. Looks awesome.
What I was first hoping for was a way to have a group of panels with tabs. (kind of how the standard tab-panel works, but with your appearance.)
And that individual tabs can be dragged into other groups of panels.
Photoshop has that to re-arrange several property panels to adjust the user’s workspace.
But maybe I am just making things over complicated. That’s why I was looking for existing solutions. And yours looks nice and is theme-able.
Before I was trying to create a transparent DragItem with an image blank image (color of the panel’s background) and the size of the panel.
As RawData I just passed the ID of the panel. So, when dragged into another panelgroup, it will remove the content from one group and adds it to the new group.
For a “panel receiver” I thought about using a PagePanel. When dragging the DragItem over the “receiver”, it checks if the UTI matches. I set the UTI of the dragitem to be something that can hold a dynamic groupType name. So, I can somehow make some PanelGroups accept certain panels, and refuse others, that don’t match the groupType.
That way I can keep property panels together with other property panels… and panels I use for viewers or editors together with other viewers and editors.
What I try to make is a Subtitle Editor. I had one that works with SRT and Netflix in the past. But want to make a better one. One that has more the look and feel of software most video editors use. I use Premiere. So, I want to get the look and feel of the Adobe software to make it easier to use for people already familiar with that software.
Of course it will not be a 100% match. But close enough.
A timeline will be one type of PanelGroup. Caption, Track and Project property panels will be another. And a third group would be the viewer, with a captioned-video display (a canvas showing the current frame, with caption, timecode, safe-area overlays, etc)
Mac, Windows, and Linux all handle TabPanel a little differently. Mac tab panels are just pills at the top. I know Windows will do multiple rows. I don’t actually understand your request, as neither really has “grouping.” Would you be able to mock something up in regard to grouping?
You could use BKS_TabControl with a PagePanel for the most simple implementation.
[quote=421007:@Richard Duke]that is soooo cool… does it keep the column setup when close and open the form again??
what magic did u use to do that??[/quote]
for now it is a proof of concept… but yes it could keep the column order if I want to.
detect the drag in mousedown event
make a picture of the column in the mousedrag event and initiate the drag
live-exchange the columns in the dragover event
[quote=421014:@Jean-Yves Pochez]for now it is a proof of concept… but yes it could keep the column order if I want to.
detect the drag in mousedown event
make a picture of the column in the mousedrag event and initiate the drag
live-exchange the columns in the dragover event[/quote]
thanks Jean-yves, will have a play with it when i have the time.
at least i know it is possible.
An update for this thread, the BKS Tab Control can now drag-rearrange tabs
Enable or disable drag rearrange with a simple switch in the IDE. A TabOrderChanged event is raised when the user performs a rearrange. More information and a demo project can be found at the website https://www.bkeeney.com/allproducts/bks-tab-control/