stack rect will not set the first time...
Klaus Major
klaus at major-k.de
Wed Jul 28 08:46:32 EDT 2004
Hi all,
i found an ABSOLUTELY strange workaround...?
> Hi friends,
>
> strange problem...
>
> I have a palette and want to set its rect horizontal/vertical like the
> "2lz2" palette...
>
> Setting to vertical does ALWAYS work, but setting to horizontal does
> NOT,
> i have to click TWICE!!!
>
>
> Here are the almost identical handlers:
>
> on machvertikal
> lock screen
> put the topleft of stack "2lz3" into obenlinks
> put item 1 of obenlinks into links
> put item 2 of obenlinks into oben
> repeat with i = 1 to the num of controls of cd 1
> set the loc of control i of cd 1 to the vertikal of control i of
> cd 1
> end repeat
> set the rect of fld "dasding" of cd 1 to 0,427,64,460
> set the rect of stack "2lz3" to links, oben, (links + 64), (oben +
> 516)
> ### This line ALWAYS works!!! ???
> unlock screen
> set the orientierung of stack "2lz3" to "vertikal"
> set the altloc of stack "2lz3" to "vertikal" & CR & the rect of
> stack "2lz3"
> end machvertikal
>
> This handler ALWAYS works completely and immediately!
>
> ###############################################
> on machhorizontal
> set the orientierung of stack "2lz3" to "horizontal"
> put the topleft of stack "2lz3" into obenlinks
> put item 1 of obenlinks into links
> put item 2 of obenlinks into oben
> lock screen
> repeat with i = 1 to the num of controls of cd 1
> set the loc of control i of cd 1 to the horizontal of control i of
> cd 1
> end repeat
> ## set the rect of fld "dasding" of cd 1 to 15,0,205,32
### I moved this line to the end of the handler and then it
works...?????
> set the rect of stack "2lz3" to links, oben, (links + 726), (oben +
> 60)
> ## THIS line does ONLY work when this menu is selected the SECOND
> time...
> ## I also tried to set height and width separately, but with the same
> result...?
>
> unlock screen
> set the orientierung of stack "2lz3" to "vertikal"
> set the altloc of stack "2lz3" to "vertikal" & CR & the rect of
> stack "2lz3"
set the rect of fld "dasding" of cd 1 to 15,0,205,32
> end machhorizontal
Of course there IS a filed "dasding" on this cd and its rect IS getting
set anyway...???
??????
Voodoo???
Regards
Klaus Major
klaus at major-k.de
http://www.major-k.de
More information about the use-livecode
mailing list