lib.agw.aui.AuiNotebook ALLOW_EXTERNAL_MOVE problem

Hello,

When using lib.agw.aui.AuiNotebook I am unable to drag and drop notebook tabs between different notebooks. The hint is shown but the drop does not complete.
I have attached a sample program which illustrates this problem.

I poked around in auibook.py and managed to get drag and drop working between tabs with a dirty hack, but have no doubt broken some other things.
The diff is attached. All it does is remove the AuiNotebookEvent Veto in AuiNotebook.OnTabEndDrag. Applying this patch will “fix” EXTERNAL_MOVE in the sample program.

I have seen earlier posts describing this problem and it seems that this does not happen with everyone. Is this really a problem in AuiNotebook or am I missing some vital flag?

I’m using the latest SVN version of agw (r66295) and:

python ‘2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)]’
wx ‘2.9.1.1 (msw-unicode)’
Windows 7 Home Premium

Thanks for any help,
Craig

aui_nb_sample.py (929 Bytes)

auibook.diff (553 Bytes)

Hi,

···

On Wed, Jan 5, 2011 at 7:43 AM, Craig Lang <serotonins.gone@gmail.com> wrote:

Hello,

When using lib.agw.aui.AuiNotebook I am unable to drag and drop notebook
tabs between different notebooks. The hint is shown but the drop does not
complete.
I have attached a sample program which illustrates this problem.

I poked around in auibook.py and managed to get drag and drop working
between tabs with a dirty hack, but have no doubt broken some other things.
The diff is attached. All it does is remove the AuiNotebookEvent Veto in
AuiNotebook.OnTabEndDrag. Applying this patch will "fix" EXTERNAL_MOVE in
the sample program.

I have seen earlier posts describing this problem and it seems that this
does not happen with everyone. Is this really a problem in AuiNotebook or am
I missing some vital flag?

As the comment in the file says you must explicitly allow the dnd action.

Change the: e.Veto() -> e.Allow()

Cody