Odd behaviour of label.enter event

Post Reply
bill-lancaster
Posts: 60
Joined: Tuesday 26th September 2017 3:17pm
Location: NW England

Odd behaviour of label.enter event

Post by bill-lancaster » Thursday 20th December 2018 11:58am

I have written a simple family tree programme that has labels with individual's information.
I've maximised the screen and have a balloon of extra information when the pointer enters the label.
This works for labels in the upper two thirds (approx) of the screen, below that, only the very top most part of the label responds to the 'on enter' event.
This isn't a big problem but I'd be interested to hear any views

stevedee
Posts: 116
Joined: Monday 20th March 2017 6:06pm

Re: Odd behaviour of label.enter event

Post by stevedee » Thursday 20th December 2018 12:18pm

I believe I had similar display problems years ago, and I think it was an underlying gtk issue.

I think switching from gb.gtk to gb.qt4 solved the problem, so it might be worth experimenting with this.

bill-lancaster
Posts: 60
Joined: Tuesday 26th September 2017 3:17pm
Location: NW England

Re: Odd behaviour of label.enter event

Post by bill-lancaster » Thursday 20th December 2018 2:27pm

Thanks stevedee ,
I'm using QT4/5, tried a simple project (without so many labels but still QT4/5) and the .enter works fine.
I'll try some more angles

User avatar
cogier
Site Admin
Posts: 282
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: Odd behaviour of label.enter event

Post by cogier » Thursday 20th December 2018 4:42pm

I have knocked up a bit of code with over 200 labels and a Balloon pops up every time. I have tried it with GTK and QT4 and it works well.

Have a look at the code and see if it helps. If not can you post some code to demonstrate the problem.
NewTest.tar.gz
(12.29 KiB) Downloaded 75 times

bill-lancaster
Posts: 60
Joined: Tuesday 26th September 2017 3:17pm
Location: NW England

Re: Odd behaviour of label.enter event

Post by bill-lancaster » Friday 21st December 2018 10:02am

Thanks Cogier, couldn't open the file, error message "Ark does not support this file type"
But . . . . .
I have been using the .enter event to show an information balloon, I need the balloon to show for as long as the pointer is inside the label. I achieved this by calling balloon.hide on the .leave event. It's the .hide function causing the problem. If I create two labels, one at the top and one at the bottom of the (full) screen the the lower label responds in an odd way with the balloon.hide feature, If I leave this feature out then the behaviour is normal.
Now my problem is how to achieve the balloon behaviour that I want.
Thanks again

User avatar
cogier
Site Admin
Posts: 282
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: Odd behaviour of label.enter event

Post by cogier » Friday 21st December 2018 12:13pm

Try this file, it should work with Ark: -
NewTest.7z
(11.91 KiB) Downloaded 86 times

bill-lancaster
Posts: 60
Joined: Tuesday 26th September 2017 3:17pm
Location: NW England

Re: Odd behaviour of label.enter event

Post by bill-lancaster » Friday 21st December 2018 2:02pm

Thanks Cogier, that worked fine, and a Happy Christmas to you!

Post Reply