Re. Data Grid does not work in resizeStack handler
R.H.
roland.huettmann at gmail.com
Wed May 16 09:22:00 EDT 2018
> Tom Glod wrote: " can you post your resize script?"
Dear Tom, here is the script where the data grid fails and I do not know
why.
Thank you for taking notice.
on resizeStack w,h
## Datagrid is the "master", a list of project names.
## There is a detail form on top that opens when user clicks on a row
## The script is a card script
local tLeft=0
---
set the width of graphic "h1" to w
set the left of graphic "h1" to 0
---
set the width of graphic "r1" to w
set the top of graphic "r1" to the bottom of graphic "h1"
set the left of graphic "r1" to 0
---
put the left of graphic "h2" into tLeft
set the width of graphic "h2" to the width of graphic "h1" - tLeft - 240
if the width of graphic "h2" < 160 then set the width of graphic "h2"
to 160
set the left of graphic "h2" to tLeft
--
set the bottomright of widget "add" to w-35 &comma& h-35
set the loc of widget "cross" to the loc of widget "add"
---
set the right of field "logout" to w-15
---
set the height of graphic "v1" to h - ( the bottom of graphic "r1" )
set the top of graphic "v1" to the bottom of graphic "r1"
set the left of graphic "v1" to the left of graphic "h2"
---
## If this DG group is used then the resizeStack handler breaks
## with unpredictable results of controls:
set the width of group "dg1" to ( w - the right of graphic "v1" )
set the height of group "dg1" to ( h - the bottom of graphic "r1" )
set the topleft of group "dg1" to \
(the right of graphic "v1") &comma& (the bottom of graphic "r1")
---
## This is a detail form on top of the table view opening
## when the user clicks a row:
set the width of graphic "project_group_header" to the width of group
"project_group"
set the width of graphic "project_group_underline" to the width of
group "project_group"
set the bottom of graphic "project_group_header" to the top of group
"project_group"
set the top of graphic "project_group_underline" to the bottom of group
"project_group"
set the left of graphic "project_group_header" to the left of group
"project_group"
set the left of graphic "project_group_underline" to the left of group
"project_group"
set the loc of field "project_group_title" to the loc of graphic
"project_group_header"
set the left of field "project_group_title" to the left of graphic
"project_group_header" +15
set the loc of group "project_group" to the loc of this card
set the top of group "project_group" to the top of \
group "project_group" - the height of graphic "project_group_header"
---
end resizeStack
Regards, Roland
More information about the use-livecode
mailing list