Re: Tab alignment in fields

2017-12-12 Thread Fraser Gordon via use-livecode
On 12/12/2017 17:45, Sannyasin Brahmanathaswami via use-livecode wrote:
> If you set tab stops for a field, Is there a way to set the alignment for one 
> stop/column?
> e.g. have all the numbers in the final column on the right align vertically 
> to the decimal point or left??
Yup - https://livecode.com/resources/api/#livecode_script/tabalign

> I'm pretty sure the answer is no, but just checking if I missed something new…
I added it in LiveCode 7 because we needed most of its mechanisms to
implement right-to-left text properly; getting per-tab-cell alignment
was just a happy bonus ;)

> All the new text style options seem to be for an entire paragraph (aka 
> "line). Nothing in the dictionary related to a "chunk" alignment.

By necessity, tabs have to apply to a whole line - it doesn't really make sense 
to have them settable at any other granularity. (Though, as always, you can set 
them on the field as a whole).

Fraser


___
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: fontNames

2017-02-03 Thread Fraser Gordon via use-livecode

On 2017-02-03 21:03, Phil Davis via use-livecode wrote:

I'm currently fiddling around with fonts. I see that the list returned 
by 'the fontNames' contains some 'placeholder' values, namely these:


   (Default)
   (Menu)
   (Message)
   (Styled Text)
   (System)
   (Text)
   (Tooltip)

Is there a way to find out what font is used when a field's textFont 
is set to "(Default)" or some other placeholder value?
Yes and no - the font that is being used for, say, "(Message)" has a 
name that will be returned if you ask the macOS system for the font for 
push buttons and then ask what the name of that font is - it might be 
"San Francisco" on recent versions of macOS, for example. When I 
originally added these pseudo-fonts in LC8, that's exactly what asking 
for 'the effective textfont of...' would give you. Unfortunately, it 
turns out that the font you get when you try to request the macOS system 
fonts by name is *not* the same font as when you ask the 'official' way 
(which means that setting the textFont of a control to its effective 
textFont actually changes the font!).


So, no, because LiveCode doesn't provide a way to get the "display name" 
of the font used for these.


But yes, because the font really *is* "(Message)" because that's the 
only name for it that LiveCode can actually use.


I hope that's about as clear as mud for you ;)

Fraser

___
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