possible bug in Data Grid with a checkbox

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
keram
Posts: 340
Joined: Fri Nov 08, 2013 4:22 am

possible bug in Data Grid with a checkbox

Post by keram » Thu Jan 22, 2015 5:02 am

Hello,

I'd like to get some feedback on this annoying behavior in the Data Grid with a checkbox - it's probably a bug of the DG itself.

When the text in a row is long and part of it (even 1 line) is not visible, is below the bottom edge of the Data Grid then when selecting its checkbox the row jumps up and the checkbox remains unselected. Once the row is fully visible one can select the checkbox. Try to select the checkbox in row number 4 in the attached stack.

Similar thing is happening when you try to disselect the checkbox - select and unselect the checkbox for row 3, scroll all the way up so that the row 4 is not fully visible and then try to uncheck the checkbox 4 - again the row 4 jumps up and the checkbox remains as it was.
See the attached screen capture video; sorry for fuzzy quality but I had to keep the attachment small.

Any ideas why this is happening?

keram
Attachments
checkbox in data grid possible bug screenshot.zip
(153.52 KiB) Downloaded 229 times
checkbox in data grid possible bug.zip
(30.52 KiB) Downloaded 210 times
Using the latest stable version of LC Community 6.7.x on Win 7 Home Premium, 64bit

keram
Posts: 340
Joined: Fri Nov 08, 2013 4:22 am

Re: possible bug in Data Grid with a checkbox

Post by keram » Fri Jan 23, 2015 2:04 am

Yes, it's a bug in the data grid - confirmed.
http://quality.runrev.com/show_bug.cgi?id=14430
Using the latest stable version of LC Community 6.7.x on Win 7 Home Premium, 64bit

keram
Posts: 340
Joined: Fri Nov 08, 2013 4:22 am

Re: possible bug in Data Grid with a checkbox

Post by keram » Fri Jan 30, 2015 3:23 am

Hi,

I've got this problem clarified by Heather and Elanor from RunRev (see the above link).
Heather writes:
"...and asked our team to look into it. I see that in fact this is not so much a
bug as just wrongly documented,"

Elanor writes:
"The reason that this is happening is because when you click on a row in the
datagrid it scrolls fully into view, this results in the checkbox moving and
therefore it does not receive the mouseUp message which causes it to
highlight(or unhighlight). The mouseUp message is not sent if the control under
the mouse changes after mouseDown, instead the mouseRelease message is sent.
The mouseRelease message does not cause a checkbox to highlight(or
unhighlight).

This issue can be solved by setting the property of the DataGrid which
specifies whether rows should scroll into view when they are highlighted, you
can do this as follows

set the dgProps["scroll selections into view"] of group "DataGrid 1" of me to false
------------------------------------------------------------------------------------------

So now it's working OK.
See, how lack of documentation can cause headaches? and you still won't find it on this page: http://lessons.runrev.com/s/lessons/m/d ... properties
Using the latest stable version of LC Community 6.7.x on Win 7 Home Premium, 64bit

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: possible bug in Data Grid with a checkbox

Post by Simon » Fri Jan 30, 2015 3:31 am

Would changing the height of the checkbox to the height of the row help?

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

keram
Posts: 340
Joined: Fri Nov 08, 2013 4:22 am

Re: possible bug in Data Grid with a checkbox

Post by keram » Fri Jan 30, 2015 3:49 am

I did not try, but often the height of the row is really big. Anyway setting the dgProps in the right way fixed the problem.
Using the latest stable version of LC Community 6.7.x on Win 7 Home Premium, 64bit

Post Reply