[wxPython-users] FlatNotebook - can I veto a drag/drop
Werner F. Bruhin
werner.bruhin at free.fr
Fri Aug 3 08:17:37 PDT 2007
Hi Andrea,
Andrea Gavana wrote:
> Hi Werner,
>
> On 8/3/07, wbruhin at free.fr wrote:
>
>> I am using the flatnotebook and I delay loading page content for
>> performance reasons.
>>
>> So, I like to veto a drag/drop if the content is not yet loaded, but I
>> don't see/find which event I need to catch/veto for this.
>>
>
> It looks like there is no event associated (yet) to the drag and drop
> operations themselves... For the moment, you might try something like
> that as a workaround:
>
This workaround is working like a charm. Thanks!
Werner
> bookStyle = theNotebook.GetWindowStyleFlag()
> bookStyle &= ~(fnb.FNB_ALLOW_FOREIGN_DND)
> bookStyle |= fnb.FNB_NO_DRAG
>
Just for the archive, there is a little type fnb.FNB_NO_DRAG should be
fnb.FNB_NODRAG
> theNotebook.SetWindowStyleFlag(bookStyle)
>
> # Later on, when loading finishes...
> bookStyle &= ~(fnb.FNB_NODRAG)
> bookStyle |= fnb.FNB_ALLOW_FOREIGN_DND
> theNotebook.SetWindowStyleFlag(bookStyle)
>
> I am not 100% sure it will work, but you might try it... in any case,
> I'll find some time to implement this missing feature, if no one sees
> anything against it.
>
>
> Andrea.
>
> "Imagination Is The Only Weapon In The War Against Reality."
> http://xoomer.alice.it/infinity77/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wxPython-users-help at lists.wxwidgets.org
>
>
>
>
More information about the wxpython-users
mailing list