why check box does not move when stack is resized?

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
keram
Posts: 340
Joined: Fri Nov 08, 2013 4:22 am

why check box does not move when stack is resized?

Post by keram »

Hello,

I made a stack that displays lines of text that change their width when the stack is resized.
The Category columns is changing its position on resizing but the check box does not.

What am I missing in the code? What changes have to be made?

Thanks in advance.

keram
Attachments
Data grid Form-variable line height+checkbox.zip
(9.85 KiB) Downloaded 345 times
Using the latest stable version of LC Community 6.7.x on Win 7 Home Premium, 64bit
Ledigimate
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 132
Joined: Mon Jan 14, 2013 3:37 pm

Re: why check box does not move when stack is resized?

Post by Ledigimate »

In the datagrid's behavior script, change

Code: Select all

## Expand field to fill available width
put the rect of btn "btnCheck" of me into theFieldRect
put item 3 of pControlRect - 5 into item 3 of theFieldRect
set the rect of btn "btnCheck" of me to theFieldRect
to

Code: Select all

## Reposition the check box
set the left of btn "btnCheck" of me to (item 3 of pControlRect - item 1 of pControlRect) - 36
010100000110010101100001011000110110010100111101010011000110111101110110011001010010101101010100011100100111010101110100011010000010101101001010011101010111001101110100011010010110001101100101
keram
Posts: 340
Joined: Fri Nov 08, 2013 4:22 am

Re: why check box does not move when stack is resized?

Post by keram »

Thanks, it works perfectly now.
Using the latest stable version of LC Community 6.7.x on Win 7 Home Premium, 64bit
Post Reply