Page 1 of 1
Hide the datagrid borders
Posted: Fri Oct 27, 2017 7:01 pm
by tomsve
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
Re: Hide the datagrid borders
Posted: Fri Oct 27, 2017 7:17 pm
by quailcreek
It's under the "Basic" tab on the datagrids property inspector.
Re: Hide the datagrid borders
Posted: Fri Oct 27, 2017 8:58 pm
by tomsve
quailcreek, "Show border" is not checked and "Border width" is 0, if that's what you meant?
Regards,
Tom
Re: Hide the datagrid borders
Posted: Fri Oct 27, 2017 9:06 pm
by quailcreek
Yep... that's what I meant. Is the DG part of another group? What version of LC?
Re: Hide the datagrid borders
Posted: Fri Oct 27, 2017 9:24 pm
by tomsve
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?
Re: Hide the datagrid borders
Posted: Sat Oct 28, 2017 1:33 am
by quailcreek
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