Re: Script to find bottom of lowest field
Yes, max and an array. Thanks Hermann!! On Apr 3, 2017, at 2:58 PM, hh via use-livecodewrote: > on mouseUp > put 20+maxbottom() > end mouseUp > > -- note: invisible or hidden fields are included > function maxbottom > repeat with i=1 to the num of fields of this card >put the bottom of fld i of this card into b[i] > end repeat > return max(b) > end maxbottom > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Script to find bottom of lowest field
A sneakier way would be to select all, group them, then get the bottom of the group, then ungroup them again. Account for group margins (2 or 3 pixels or something). If there are other objects of course that won't help you. Bob S > On Apr 3, 2017, at 15:02 , Ralph DiMola via use-livecode >wrote: > > Put -9 into tMax > Repeat with I = 1 to the number of fields of this card > Put the max (tmax,the bottom of field I) into tMax > End repeat > > Create field > Put it into tField > Set the top tField to tMax + 20 > > Ralph DiMola ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
RE: Script to find bottom of lowest field
Not tested: Put -9 into tMax Repeat with I = 1 to the number of fields of this card Put the max (tmax,the bottom of field I) into tMax End repeat Create field Put it into tField Set the top tField to tMax + 20 Ralph DiMola IT Director Evergreen Information Services rdim...@evergreeninfo.net -Original Message- From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of Peter Bogdanoff via use-livecode Sent: Monday, April 03, 2017 5:34 PM To: How to use LiveCode Cc: Peter Bogdanoff Subject: Script to find bottom of lowest field Hi script wizards! I have a card containing a number of fields. I want to add another field, but position this new field to have its top 20 pixels lower than the bottom of any of the existing fields. Does anyone already have a magic script to do this? I also want to learn something new! Peter Bogdanoff ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Script to find bottom of lowest field
on mouseUp put 20+maxbottom() end mouseUp -- note: invisible or hidden fields are included function maxbottom repeat with i=1 to the num of fields of this card put the bottom of fld i of this card into b[i] end repeat return max(b) end maxbottom ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Script to find bottom of lowest field
Hi script wizards! I have a card containing a number of fields. I want to add another field, but position this new field to have its top 20 pixels lower than the bottom of any of the existing fields. Does anyone already have a magic script to do this? I also want to learn something new! Peter Bogdanoff ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode