field losing formatting on copying
paulhibbert at mac.com
Thu Jun 5 20:58:19 EDT 2014
Just tried another test. I renamed the appropriate fields to begin with "Case" and tried this script in the "Do it" button…
if exists(grp "J_1" of this cd) then
delete grp "J_1" of this cd
copy grp "J_1" of cd 1 of stack "rawForms" to this cd
set the topleft of it to 1,1
repeat with i = 1 to the number of fields on card "r_controls"
if the short name of field i begins with "Case" then \
set the textHeight of fld i to 12
…And it seems to work OK just resetting the textHeight.
I know this doesn't answer why the problem occurs, but it does workaround it. I tried setting the textHeight & textSize of the stack "mcp", card "r_controls", the templateField and the templateGroup, all had no effect on the copied group.
I don't have LC5.5.4 installed, but I used LC5.5.5 (on Mac OS X 10.8.5), I expect it would be the same.
On 2014-06-05, at 2:45 PM, Peter Haworth <pete at lcsql.com> wrote:
> Good catch. The textsize also changes from 9 to 11 (actually the effective
> I think I see why this is happening and Dar touched on it in an earlier
> post. The label field and its owning groups have a blank textsize in the
> rawforms stack but the rawforms stack has its textsize set to 9. The mcp
> stack on the other hand has an empty textsize so it defaults to 11which
> also causes the textheight to change.
> Set the text size of the mcp stack to 9 and all should work fine.
> lcSQL Software <http://www.lcsql.com>
> Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
> SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>
> On Thu, Jun 5, 2014 at 12:52 PM, Paul Hibbert <paulhibbert at mac.com> wrote:
>> It's not the margins that are changing on the copy, but the 'textHeight'
>> property is, it changes from 12 to 14.
>> Not sure why it should do that though.
>> On 2014-06-05, at 11:39 AM, Dr. Hawkins <dochawk at gmail.com> wrote:
>>> On Thu, Jun 5, 2014 at 10:36 AM, Peter Haworth <pete at lcsql.com> wrote:
>>>> OK, misunderstood. However, the label field also shows up with margins
>>>> 0,2,0,0 on my end.
>>> So it does . . . but look at it--the text in the original fits in the
>>> field, while the text in the copy doesn't.
>>> There is *something* different about these two fields . . . and not
>>> everything does this on copy, but the fields that do are consistent about
>>> Dr. Richard E. Hawkins, Esq.
>>> (702) 508-8462
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the Use-livecode