Trackpads.quailcreek wrote: ↑Thu Dec 28, 2017 7:01 amI was just thinking about the swipe grps not being found. I'll bet the swipe capability is mobile only.
http://quality.livecode.com/show_bug.cgi?id=8446
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Trackpads.quailcreek wrote: ↑Thu Dec 28, 2017 7:01 amI was just thinking about the swipe grps not being found. I'll bet the swipe capability is mobile only.
Here's how I handled it in mine:Laying Out Rows
When positioning controls in your row behavior script, you can take into account any edit mode controls that have been overlaid onto the row by using the rows working rect. The working rect is
passed as the second parameter to the LayoutControl message that is sent to your row behavior
script.
on LayoutControl pControlRect, pWorkingRect
...
end LayoutControl
Code: Select all
on LayoutControl pControlRect, pWorkingRect
  local theFieldRect1,theFieldRect2
  
  put the rect of field "Name" of me into theFieldRect1
  put (item 1 of pWorkingRect + 75) into item 1 of theFieldRect1
  put item 3 of pWorkingRect - 5 into item 3 of theFieldRect1
  set the rect of field "Name" of me to theFieldRect1
  
  put the rect of field "More" of me into theFieldRect2
  put (item 1 of pWorkingRect + 75) into item 1 of theFieldRect2
  put item 3 of pWorkingRect - 5 into item 3 of theFieldRect2
  set the rect of field "More" of me to theFieldRect2
  
  set the left of img "imageHolder" of me to (item 1 of pWorkingRect + 7) 
  
  set the height of fld "Name" of me to the formattedHeight of fld "Name" of me
  set the height of fld "More" of me to the formattedHeight of fld "More" of me
  set the top of fld "More" of me to (the bottom of fld "Name" of me + 6)
  
  set the rect of graphic "GrayBackground" of me to pControlRect
end LayoutControlFourthWorld wrote: ↑Thu Dec 28, 2017 6:04 amSo now it populates, but I still can't run it - I get an error on line 22 of group "Row Template 003" - "can't find background":
if the vis of grp "DG2 Default Right Swipe Control" OR the vis of grp "DG2 Default Left Swipe Control" then

Code: Select all
command createTheScroller
   local sScrollerID, theWidth, theHeight
   
   if environment() is not "mobile" then exit createTheScroller
   
   if "theDataGrid" is not among the lines of mobileControls() then
      mobileControlCreate "scroller", "theDataGrid"
      put the result into sScrollerID
   end if
   mobileControlSet sScrollerID, "rect", (the rect of grp sTheDataGridName)
   
   put the dgFormattedWidth of grp sTheDataGridName into theWidth
   put the dgFormattedHeight of grp sTheDataGridName into theHeight
   
   mobileControlSet sScrollerID, "hscroll", 0
   mobileControlSet sScrollerID, "vscroll", 0
   mobileControlSet sScrollerID, "contentRect", (0,0,theWidth,theHeight)
   mobileControlSet sScrollerID, "visible", "true"
   mobileControlSet sScrollerID, "canBounce", "false"
   mobileControlSet sScrollerID, "pagingEnabled", "false"
   mobileControlSet sScrollerID, "canScrollToTop", "true"
   mobileControlSet sScrollerID, "delayTouches", "true"
   mobileControlSet sScrollerID, "canCancelTouches", "false"
   mobileControlSet sScrollerID, "declerationRate", "normal"
   mobileControlSet sScrollerID, "lockDirection", "true"
   mobileControlSet sScrollerID, "scrollingEnabled", "true"
   
   mobileControlSet sScrollerID, "hIndicator", "false"
   mobileControlSet sScrollerID, "vIndicator", "false"
   
   --   set the dgvScroll of grp tScrollerGroup to 0
end createTheScroller
on scrollerBeginDrag
   set the dgHilitedLine of grp sTheDataGridName to empty
   -- mobileControlSet sScrollerId, "delayTouches", true
end scrollerBeginDrag
on scrollerEndDrag
   set the dgHilitedLine of grp sTheDataGridName to empty
   -- mobileControlSet sScrollerId, "delayTouches", false
end scrollerEndDrag
on scrollerDidScroll OffsetX, OffsetY
   set the dgvScroll of grp sTheDataGridName to OffsetY
   set the dgHScroll of grp sTheDataGridName to OffsetX
end scrollerDidScroll