2nd datagrid is not resizing

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
vladoportos
Posts: 17
Joined: Wed Jun 20, 2012 8:21 pm

2nd datagrid is not resizing

Post by vladoportos » Thu Jul 05, 2012 9:08 am

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

snm
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 253
Joined: Fri Dec 09, 2011 11:17 am

Re: 2nd datagrid is not resizing

Post by snm » Thu Jul 05, 2012 1:24 pm

On each card with DataGrd or there objects with set Geometry, put preOpenCard handler:

on preOpenCard
revUpdategeometry
end preOpenCard

to refresh geometry settings

Marek

vladoportos
Posts: 17
Joined: Wed Jun 20, 2012 8:21 pm

Re: 2nd datagrid is not resizing

Post by vladoportos » Thu Jul 05, 2012 2:23 pm

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 !

Post Reply