Textsize of label of copied btn changes
Richard Gaskin
ambassador at fourthworld.com
Thu Oct 15 03:23:31 EDT 2020
William Prothero wrote:
> After the button is copied to the destination card, I do:
>
> set the textsize of btnRef to the textsize of srcBtnRef
> the contents of btnRef is:
>
> btn "doNext2" of card "WhatsTheMystery-2" of stack "/Users/AfilePath
> /PlateTectonics.livecode"
>
> srcBtnRef is pretty much the same thing with the card that holds the
> object library.
>
> It has no effect. But then, I’ve been known to screw up these
> references, but since the copy works, I think it’s ok.
>
> What’s odd, is that it seems to be picking up the fontsize of some of
> the other fields on the destination card. So, for now, I’ve given up
> and use a field for a button, which I like better anyway. I’ll look at
> this again to see if I made a stupid mistake.
No need to give up and use an object type you didn't want.
This is an opportunity to analyze so we can find the right solution.
Given that assigning the textFont of the new button to that of the old
one has no effect, I'd wager that if you examined the textFont of the
original you'd find it's not been assigned.
And we see that font settings for various objects look one way on one
card and different on a different card.
This suggests the card the original button is on has a textFont set, and
setting the textFont of the new card to match will give you a matching
appearance for controls.
Or perhaps simpler, if you want all cards in the stack to have the same
default textFont and textSize, you can set those properties in the
stack, clear those for each card, and then you have consistency
throughout the controls in your stack.
--
Richard Gaskin
Fourth World Systems
Software Design and Development for the Desktop, Mobile, and the Web
____________________________________________________________________
Ambassador at FourthWorld.com http://www.FourthWorld.com
More information about the use-livecode
mailing list