# Evt\_auinotebook\_end\_drag?

**URL:** <https://www.ruby-forum.com/t/evt-auinotebook-end-drag/146194>\
**Category:** wxRuby\
**Created:** [August 18, 2008, 11:29pm UTC](https://www.ruby-forum.com/t/evt-auinotebook-end-drag/146194 "2008-08-18T23:29:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![requiem](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e9bcb4/32.png) [@requiem](https://www.ruby-forum.com/u/requiem)\
**Post date:** [August 18, 2008, 11:29pm UTC](https://www.ruby-forum.com/t/evt-auinotebook-end-drag/146194/1 "2008-08-18T23:29:11Z")

</div>

Hello,

this is my code (in a frame’s constructor):

self.evt\_auinotebook\_page\_close(@notebook) { puts “page closed!” }  
self.evt\_auinotebook\_end\_drag(@notebook) { puts “page moved away!” }

while the first works as expected, the second does not work at all. the  
block is never called, when a tab is moved from the target-notebook to  
another one.

is this a bug? if yes, can this be fixed?

if want a notebook that adds to itself an empty page if there are no  
more other tabs (so that it stays usable). therefore i must somehow  
react on the user closing tabs. is there perhaps another way to work  
around this?

Greetings,  
Niklas

---

<div class="post-metadata">

**Author:** ![requiem](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e9bcb4/32.png) [@requiem](https://www.ruby-forum.com/u/requiem)\
**Post date:** [August 19, 2008, 2:41pm UTC](https://www.ruby-forum.com/t/evt-auinotebook-end-drag/146194/2 "2008-08-19T14:41:04Z")

</div>

Niklas B. wrote:

> Hello,
> 
> this is my code (in a frame’s constructor):
> 
> self.evt\_auinotebook\_page\_close(@notebook) { puts “page closed!” }  
> self.evt\_auinotebook\_end\_drag(@notebook) { puts “page moved away!” }
> 
> while the first works as expected, the second does not work at all. the block is never called, when a tab is moved from the target-notebook to another one.  
> I’m a bit puzzled by this too. Unfortunately I can’t find documentation  
> in wxWidgets of exactly when these events should occur.

However, your query prompted me to look again at the auibook header in  
Wx. It seems that since version 2.8.5, several new AUI events were  
added, including EVT\_AUINOTEBOOK\_DRAG\_DONE. I’ve added support for these  
events to wxRuby (SVN:1773), and this drag\_done event does exactly what  
you’re looking for. So you should be able to resolve this with the next  
wxRuby release (soon…)

cheers  
alex

---

<div class="post-metadata">

**Author:** ![requiem](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e9bcb4/32.png) [@requiem](https://www.ruby-forum.com/u/requiem)\
**Post date:** [August 19, 2008, 4:30pm UTC](https://www.ruby-forum.com/t/evt-auinotebook-end-drag/146194/3 "2008-08-19T16:30:57Z")

</div>

Hello,

Alex F. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> in wxWidgets of exactly when these events should occur.
> 
> However, your query prompted me to look again at the auibook header in  
> Wx. It seems that since version 2.8.5, several new AUI events were  
> added, including EVT\_AUINOTEBOOK\_DRAG\_DONE. I’ve added support for these  
> events to wxRuby (SVN:1773), and this drag\_done event does exactly what  
> you’re looking for. So you should be able to resolve this with the next  
> wxRuby release (soon…)

thank you very much! by the way, when is the final version of wxruby  
going to be released? i love it 🙂

Greetings,  
Niklas

---

<div class="post-metadata">

**Author:** ![requiem](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e9bcb4/32.png) [@requiem](https://www.ruby-forum.com/u/requiem)\
**Post date:** [August 19, 2008, 4:46pm UTC](https://www.ruby-forum.com/t/evt-auinotebook-end-drag/146194/4 "2008-08-19T16:46:11Z")

</div>

Niklas B. wrote:

> Alex F. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > I’ve added support for these  
> > events to wxRuby (SVN:1773), and this drag\_done event does exactly what  
> > you’re looking for. So you should be able to resolve this with the next  
> > wxRuby release (soon…)
> 
> thank you very much! by the way, when is the final version of wxruby going to be released? i love it 🙂  
> That’s kind of you to say so… as for 2.0 it’s up for discussion on the  
> dev- mailing list. Basically I’d like to fix all the bugs that are  
> fixable within wxRuby (some are wxWidgets problems):

[http://rubyforge.org/tracker/?atid=218&group\_id=35&func=browse](http://rubyforge.org/tracker/?atid=218&group_id=35&func=browse)

I would like the next release to be the final, but there’s a few  
instabilities in 1.9.7 so it might be better for us to get another beta  
out sooner and then chip away at the remaining tricky bugs (GTK  
clipboard … 😉

cheers  
alex

---

<div class="post-metadata">

**Author:** ![requiem](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e9bcb4/32.png) [@requiem](https://www.ruby-forum.com/u/requiem)\
**Post date:** [August 19, 2008, 5:18pm UTC](https://www.ruby-forum.com/t/evt-auinotebook-end-drag/146194/5 "2008-08-19T17:18:26Z")

</div>

Hello,

Alex F. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> That’s kind of you to say so… as for 2.0 it’s up for discussion on the  
> dev- mailing list. Basically I’d like to fix all the bugs that are  
> fixable within wxRuby (some are wxWidgets problems):
> 
> [http://rubyforge.org/tracker/?atid=218&group\_id=35&func=browse](http://rubyforge.org/tracker/?atid=218&group_id=35&func=browse)
> 
> I would like the next release to be the final, but there’s a few  
> instabilities in 1.9.7 so it might be better for us to get another beta  
> out sooner and then chip away at the remaining tricky bugs (GTK  
> clipboard … 😉

ok I’m in no hurry 🙂

Greetings,  
Niklas
