Sign up

addOnMoveHandle not being called

APaned.addOnMoveHandle((GtkScrollType, Paned p) { });

Is never called. Is there something I have to do to make this work?

Re: addOnMoveHandle not being called

On Tue, 11 Jun 2019 07:59:10 GMT, Alex X wrote:

APaned.addOnMoveHandle((GtkScrollType, Paned p) { });

Is never called. Is there something I have to do to make this work?

It's been a while since I wrote up the blog examples, but I seem to remember running into this as well.

If you just want to track the position of the divider, you can use addOnButtonRelease().

Re: addOnMoveHandle not being called

On Tue, 11 Jun 2019 09:56:54 GMT, Ron Tarrant wrote:

On Tue, 11 Jun 2019 07:59:10 GMT, Alex X wrote:

APaned.addOnMoveHandle((GtkScrollType, Paned p) { });

Is never called. Is there something I have to do to make this work?

It's been a while since I wrote up the blog examples, but I seem to remember running into this as well.

If you just want to track the position of the divider, you can use addOnButtonRelease().

The problem is one can't do this in real time. Meaning if one needs to monitor the changes in between to do something responsible it is not possible. Of course one can create a motion change event to deal with it all but it requires quite a bit more code for something that is a bug.

Re: addOnMoveHandle not being called

Also, it seems that button click events are not being bubbled up. I have tried to capture them for a paned handle using the main parent window but when I move the handle it it never gets called.

The reason I tried this is that it seems that the y coordinate is relative to the child rather than to the container itself and this made it hard to work with.

I'm going to try to translate them to the parent or find some other method(maybe I can find the specific child widget and somehow calculate it from there).

Re: addOnMoveHandle not being called

On Tue, 11 Jun 2019 15:16:11 GMT, Alex X wrote:

The problem is one can't do this in real time. Meaning if one needs to monitor the changes in between to do something responsible it is not possible.

What task are you trying to hook up that needs real-time monitoring? Or is this just exploration to see if it's possible?

Re: addOnMoveHandle not being called

On 11-06-2019 09:59, Alex X wrote:

APaned.addOnMoveHandle((GtkScrollType, Paned p) { });

Is never called. Is there something I have to do to make this work?

According to the GTK documentation it is only called when the separator
is moved with a key binding.

This should probably do what you want:

APaned.addOnNotify((ParamSpec, ObjectG obj) {  }, "position");

You can cast obj to Paned if you need it.

Re: addOnMoveHandle not being called

On Tue, 11 Jun 2019 20:03:48 +0200, Mike Wey wrote:

On 11-06-2019 09:59, Alex X wrote:

APaned.addOnMoveHandle((GtkScrollType, Paned p) { });

Is never called. Is there something I have to do to make this work?

According to the GTK documentation it is only called when the separator
is moved with a key binding.

This should probably do what you want:

APaned.addOnNotify((ParamSpec, ObjectG obj) {  }, "position");

You can cast obj to Paned if you need it.

Ok, I red that in the docs but got confused or forgot... or didn't realize addOnNotify was the key(although I was using addOnNotify in the first place ;).

Thanks again.