Page 1 of 1

how do i set text alignment in live code using a button

Posted: Wed Nov 23, 2016 9:00 pm
by LiveyMcLivecode
Hey, i need help with my project where i need to have a button reset the text alignment of a filed to center after its already been changed

Re: how do i set text alignment in live code using a button

Posted: Thu Nov 24, 2016 1:57 pm
by Klaus
Hi LiveyMcLivecode,

1. welcome to the forum! :D

2. Check "textalign" in the dictionary, which is far better than its reputation!):
...
set the textalign of fld XYZ to center
...

3. Will move this thread to the "Bginner" forum, since this is not an "App Building Course" question, not related ot any "Clock" 8)

4. Please hceck these stacks to learn more about the very basics of Livecode:
http://www.hyperactivesw.com/revscriptc ... ences.html


Best

Klaus

Re: how do i set text alignment in live code using a button

Posted: Thu Nov 24, 2016 3:35 pm
by dunbarx
Very upbeat name, Lively.

Always go to the dictionary first. You will very soon, after you gain more experience, know that the word "text" has "got" to have something to do with your current question. In this particular case, there will be a lot of entries, but if you scan them you would have run across "textAlign" on your own, as Klaus directed you. And then you would have drilled into that property, and seen that it is just what you needed.

Craig Newman