Page 1 of 1

2nd datagrid is not resizing

Posted: Thu Jul 05, 2012 9:08 am
by vladoportos
Hello all,

I'm making smal program to learn LiveCode and I have two cards in one stack, two buttons that switch between them and datagrid on each card in the middle.

Datagrids have set geometry so when I drag the corner of stack, the left top corner stay in place and the right down corner moves, basically the datagrid is getting bigger as the stack is resized. This work fine.

ISSUE:

when I resize the stack and switch to the second card, the datagrid is not resized, only after I resize the stack a little it snap to correct size, same behavior when I switch back.

Any idea why is this happening and how to solve this ?

Thank you all,
Vladimir

Re: 2nd datagrid is not resizing

Posted: Thu Jul 05, 2012 1:24 pm
by snm
On each card with DataGrd or there objects with set Geometry, put preOpenCard handler:

on preOpenCard
revUpdategeometry
end preOpenCard

to refresh geometry settings

Marek

Re: 2nd datagrid is not resizing

Posted: Thu Jul 05, 2012 2:23 pm
by vladoportos
Aaah Marek so many thanks it solved the issue exactly, just had to add "pass preOpencard" in the end so my buttons work :D but really thanks !