Hide the datagrid borders

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
tomsve
Posts: 45
Joined: Tue Jan 20, 2015 5:01 pm
Location: Ukraine/Armenia

Hide the datagrid borders

Post by tomsve » Fri Oct 27, 2017 7:01 pm

It seems like I can't hide the borders of the datagrid. I tried to set everything I can find to white but they are still visible as long as it is "in focus" on mobile. If I make something else focus - they disappear. But how can I make them invisible?

Thanks,
Tom
Attachments
Screen Shot 2017-10-27 at 17.33.32.png

quailcreek
Posts: 746
Joined: Sun Feb 04, 2007 11:01 pm
Location: McKenna, WA

Re: Hide the datagrid borders

Post by quailcreek » Fri Oct 27, 2017 7:17 pm

It's under the "Basic" tab on the datagrids property inspector.
Tom
MacBook Pro OS Mojave 10.14

tomsve
Posts: 45
Joined: Tue Jan 20, 2015 5:01 pm
Location: Ukraine/Armenia

Re: Hide the datagrid borders

Post by tomsve » Fri Oct 27, 2017 8:58 pm

quailcreek, "Show border" is not checked and "Border width" is 0, if that's what you meant?

Regards,
Tom

quailcreek
Posts: 746
Joined: Sun Feb 04, 2007 11:01 pm
Location: McKenna, WA

Re: Hide the datagrid borders

Post by quailcreek » Fri Oct 27, 2017 9:06 pm

Yep... that's what I meant. Is the DG part of another group? What version of LC?
Tom
MacBook Pro OS Mojave 10.14

tomsve
Posts: 45
Joined: Tue Jan 20, 2015 5:01 pm
Location: Ukraine/Armenia

Re: Hide the datagrid borders

Post by tomsve » Fri Oct 27, 2017 9:24 pm

LC 8.1.3 and the datagrid is not in another group - just alone at the moment. I will probably need to put it in a group because I will need to scroll it eventually. Can that help maybe?

quailcreek
Posts: 746
Joined: Sun Feb 04, 2007 11:01 pm
Location: McKenna, WA

Re: Hide the datagrid borders

Post by quailcreek » Sat Oct 28, 2017 1:33 am

Not sure what's going on with the borders on your DG.

No need to grp the dadatgrid to scroll it. Here's the code I use for that.

Code: Select all

local stheDataGridName
on preOpenCard
  
  put "the datagrid name" into stheDataGridName -- you need to declare this as a script variable
  createTheScroller
  
end preOpenCard

Code: Select all

on scrollerDidScroll hOffset, vOffset
  local tScoller
  
  put mobileControlTarget() into tScoller
  
  if tScoller is "theDataGrid_1" then
    set the dgvScroll of grp stheDataGridName to vOffset
    set the dghScroll of grp stheDataGridName to hOffset
  end if
end scrollerDidScroll

command createTheScroller
  local sTopScrollerID,theWidth,theHeight,tDgRect,tDgHeaderHeight
  
  if environment() is not "mobile" then exit createTheScroller
  
  if "theDataGrid_1" is not among the lines of mobileControls() then
    MobileControlCreate "scroller", "theDataGrid_1"
    put the result into sTopScrollerID
  end if
  
  put the rect of grp stheDataGridName into tDgRect
  put DgHeight() into tDgHeaderHeight
  add tDgHeaderHeight to item 2 of tDgRect
  
  put the dgFormattedWidth of grp stheDataGridName into theWidth
  put the dgFormattedHeight of grp stheDataGridName into theHeight
  
  mobileControlSet sTopScrollerID, "hscroll", 0
  mobileControlSet sTopScrollerID, "vscroll", 0
  mobileControlSet sTopScrollerID, "rect", tDgRect
  mobileControlSet sTopScrollerID, "contentRect", (0,0,theWidth,theHeight)
  mobileControlSet sTopScrollerID, "visible", "true"
  mobileControlSet sTopScrollerID, "canBounce", "false"
  mobileControlSet sTopScrollerID, "pagingEnabled", "false"
  mobileControlSet sTopScrollerID, "canScrollToTop", "true"
  mobileControlSet sTopScrollerID, "delayTouches", "true"
  mobileControlSet sTopScrollerID, "canCancelTouches", "false"
  mobileControlSet sTopScrollerID, "declerationRate", "normal"
  mobileControlSet sTopScrollerID, "lockDirection", "true"
  mobileControlSet sTopScrollerID, "scrollingEnabled", "true"
  
  mobileControlSet sTopScrollerID, "hIndicator", "false"
  mobileControlSet sTopScrollerID, "vIndicator", "false"
end createTheScroller
Tom
MacBook Pro OS Mojave 10.14

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”