Check Hilite of Checkbox in Datagrid

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
hrcap
Posts: 131
Joined: Mon Jan 14, 2019 5:20 pm

Check Hilite of Checkbox in Datagrid

Post by hrcap » Mon Apr 20, 2020 5:43 pm

Hi All

I am looking to visit each row of a datagrid and check whether a checkbox is hilited or not, something along the lines of the following:

Code: Select all

on mouseup
   put the long id of group "dg_example" into t_dg
   
   put the dgnumberoflines of t_dg into t_no_of_lines
   
   put "" into t_line_no
   repeat until t_line_no = t_no_of_lines
   
      put t_line_no + "1" into t_line_no
      
      if the hilite of button "check_box" of dgline[t_line_no] of t_dg = "true" then
      
      --do something
      
      end if
      
   end repeat
   
end mouseup

...this isn't working correctly as it isn't visiting the checkbox on each row, I think this is something to do with how I am referencing the checkbox, i.e. of dgline of t_dg


Any input would be much appreciated.


Many Thanks

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”