New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I can not drag a panel to an empty wxAuiNotebook from another wxAuiNotebook #24111
Comments
Another question is that when the drag happens between two wxAuiNotebooks, how do I know where is the source of the wxAuiNotebook, and where is the destination of the target wxAuiNotebook? I mean currently, I don't see the I add three functions in the wxAui sample code
I can catch an event when the cross wxAuiNotebook drag done in the
The BTW: I can not catch the other events( |
OK, I just debugged a while(I'm debugging with release version of wx from msys2, so when building the aui demo sample, I have to add the option So, there is only source wxAuiNotebook pointer, I event can't figure out which panel is dragged from the source notbook to the target notebook. |
Did you check how the internal code does it? Line 2737 in 6f62907
|
Hi, thanks for the reply. It looks like if there is NO tabs in the wxAuiNotebook control, the drag will do nothing? Lines 2732 to 2748 in 6f62907
Here, the |
That pointer is for the whole tab control, if none is found at the mouse position, nothing will happen (as expected). |
The problem here is that I would like to drag an one panel from one notebook to another notebook. But the target notebook is empty, so I do not how how to do it. Maybe wx library should handle such situation? |
I would agree that this is supposed to work. If dragging into a non-empty notebook works, dragging into an empty one should work, too. Technically the problem is that the wxTabFrame gets destroyed when the last panel is removed. Line 3000 in 5ef4c10
I don't know why this is done, maybe you could just try to comment this out, and see what happens. Or the code that checks for a dropped notebook page has to create a new wxTabFrame when there is none. |
This looks like something that just hasn't been implemented. OTOH it seems pretty weird to have an empty notebook in the first place, I think a better UI would be to avoid this somehow (e.g. by destroying it entirely -- and then providing some way to recreate it later if needed). |
I'm using wxWidgets 3.2.4 and Windows 10 64bit, running the wxAui sample project.
If I have two wxAuiNotebook, and both of them are not empty, I can drag the panel between those wxAuiNotebooks if the style option:
wxAUI_NB_TAB_EXTERNAL_MOVE
is enabled.See below image shot:
Now, if the target wxAuiNotebook get empty. I mean there is NO tabs in the target wxAuiNotebook, now I can not drag a panel to this empty wxAuiNotebook, is this by design?
See below image:
Any ideas? Thanks.
The text was updated successfully, but these errors were encountered: