Re: Set Text to the Vertical Center of the field

2016-04-03 Thread J. Landman Gay
On 4/3/2016 7:25 AM, -hh wrote: J. Landman Gay wrote >When the "effective" keyword was first introduced, it applied to only a >handful of properties. Over the years, additional ones were added. When I >look in the dictionary, the keyword now shows what appears to be a >comprehensive list of prop

Re: Set Text to the Vertical Center of the field

2016-04-03 Thread -hh
J. Landman Gay wrote > When the "effective" keyword was first introduced, it applied to only a > handful of properties. Over the years, additional ones were added. When I > look in the dictionary, the keyword now shows what appears to be a > comprehensive list of properties. However, none of the

Re: Set Text to the Vertical Center of the field

2016-04-03 Thread J. Landman Gay
When the "effective" keyword was first introduced, it applied to only a handful of properties. Over the years, additional ones were added. When I look in the dictionary, the keyword now shows what appears to be a comprehensive list of properties. However, none of the formatted* properties are l

Re: Set Text to the Vertical Center of the field

2016-04-03 Thread -hh
J. Landman Gay wrote > On 4/2/2016 11:05 PM, Richard Gaskin wrote: >> put the EFFECTIVE formattedheight of \ >>char 1 to -1 of pObj into tFheight >> There it is! "EFFECTIVE"! > > Would be nice if that were documented. Hmph. Need user notes. It is documented. The 'effective keyword' in

Re: Set Text to the Vertical Center of the field

2016-04-02 Thread J. Landman Gay
On 4/2/2016 11:05 PM, Richard Gaskin wrote: put the EFFECTIVE formattedheight of \ char 1 to -1 of pObj into tFheight There it is! "EFFECTIVE"! Would be nice if that were documented. Hmph. Need user notes. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActiv

Re: Set Text to the Vertical Center of the field

2016-04-02 Thread Ralph DiMola
From: Richard Gaskin Date:04/03/2016 00:05 (GMT-05:00) To: use-livecode@lists.runrev.com Subject: Re: Set Text to the Vertical Center of the field Ralph DiMola wrote: put the EFFECTIVE formattedheight of \ char 1 to -1 of pObj into tFheight There it is! "EFFECTIVE"!

Re: Set Text to the Vertical Center of the field

2016-04-02 Thread Ralph DiMola
Subject: Re: Set Text to the Vertical Center of the field Ralph DiMola wrote: >try > put item 1 of the margins of obj into item 1 of tMargins > put item 3 of the margins of obj into item 3 of tMargins >catch SomeError > exit CenterVert -- Can't get ma

Re: Set Text to the Vertical Center of the field

2016-04-02 Thread Richard Gaskin
Ralph DiMola wrote: put the EFFECTIVE formattedheight of \ char 1 to -1 of pObj into tFheight There it is! "EFFECTIVE"! Once I use Jacque's technique of omitting the margins by obtaining only the formattedHeight of the text itself, and Ralph's astute awareness that apparently it's po

Re: Set Text to the Vertical Center of the field

2016-04-02 Thread Richard Gaskin
Ralph DiMola wrote: try put item 1 of the margins of obj into item 1 of tMargins put item 3 of the margins of obj into item 3 of tMargins catch SomeError exit CenterVert -- Can't get margins?... do nothing end try Now I'm even more worried: is there a cirumstance in which

RE: Set Text to the Vertical Center of the field

2016-04-02 Thread Ralph DiMola
This is working for me but does fall apart when the field gets very small. Also the font baselines change from Windows to both iOS and Android. Bug 12176 I have had many many variations of this task and this one is the best I've found so far but I digress, I think there's bug because if the Yoda's

Re: Set Text to the Vertical Center of the field

2016-04-02 Thread -hh
You are not talking about centering text vertically, which is solved, at least for me. You are talking about text measurement, what may be used for that but one is not forced to do so. Text measurement has changed several times since LC 6 and will change again with every new dot-release of LC 8 (a

Re: Set Text to the Vertical Center of the field

2016-04-02 Thread J. Landman Gay
On 4/2/2016 4:42 PM, Richard Gaskin wrote: That one's just a longer version of Jacque's algo, which gets the difference between the formatted height of the text from the field, and set the topMargin to half of that. That's logical and should work, but trying my version this morning and later Jac

Re: Set Text to the Vertical Center of the field

2016-04-02 Thread J. Landman Gay
On 4/2/2016 1:34 PM, Richard Gaskin wrote: IMNSO if this can't be done in three lines using Jacque's method it's a bug. put the formattedheight of line 1 to -1 of me into tTotalTextHt put ( ( the height of me - tTotalTextHt ) / 2) into tTopMargin set topmargin of me to tTopMargin Logic

Re: Set Text to the Vertical Center of the field

2016-04-02 Thread J. Landman Gay
On 4/2/2016 4:09 PM, Sannyasin Brahmanathaswami wrote: and this from Jacque >The formattedheight of the entire field apparently isn't the same as the >formattedheight of the totals of the lines. makes no sense to me... or at least it would be good to know the difference in precise terms. I'

Re: Set Text to the Vertical Center of the field

2016-04-02 Thread Scott Rossi
This has already been submitted at least a couple of times: http://quality.livecode.com/show_bug.cgi?id=2707 http://quality.livecode.com/show_bug.cgi?id=9561 Regards, Scott Rossi Creative Director Tactile Media, UX/UI Design On 4/2/16, 2:49 PM, "use-livecode on behalf of Sannyasin Brahmana

Re: Set Text to the Vertical Center of the field

2016-04-02 Thread Richard Gaskin
Sannyasin Brahmanathaswami wrote: > Can you submit? with your test stack? It's physically possible, but I'm currently tracking many bugs related to my own work. Is there something that prevents you from submitting a bug related to your work? -- Richard Gaskin Fourth World Systems Softwa

Re: Set Text to the Vertical Center of the field

2016-04-02 Thread Sannyasin Brahmanathaswami
Can you submit? with your test stack? On April 2, 2016 at 11:42:43 AM, Richard Gaskin (ambassa...@fourthworld.com) wrote: So a bug report wouldn't be for any specific number of lines, but merely that either the topMargin and/or formattedHeight be fixed so it ca

Re: Set Text to the Vertical Center of the field

2016-04-02 Thread Richard Gaskin
Sannyasin Brahmanathaswami wrote: > Someone sent me this solution off line.. > > on mouseUp > CenterTextVertically "field 2" > end mouseUp > > on CenterTextVertically myFld > put the effective textHeight of myFld into tTextHeight > put item 2 of the loc of myFld into tfield > put the form

Re: Set Text to the Vertical Center of the field

2016-04-02 Thread Sannyasin Brahmanathaswami
  Someone sent me this solution off line.. on mouseUp CenterTextVertically "field 2" end mouseUp on CenterTextVertically myFld put the effective textHeight of myFld into tTextHeight put item 2 of the loc of myFld into tfield put the formattedRect of line 1 to - 1 of myFld into tFormatRect put i

Re: Set Text to the Vertical Center of the field

2016-04-02 Thread Richard Gaskin
Ive tried several of the methods discussed here and one of my own, and while some work at some field heights they break at others. I didn't use fixedLineHeight because that shouldn't be needed; indeed I can imagine many cases in which a field may have different sizes of text, so we need a solu

Re: Set Text to the Vertical Center of the field

2016-04-02 Thread J. Landman Gay
On 4/2/2016 12:54 PM, J. Landman Gay wrote: On 4/1/2016 11:08 PM, Sannyasin Brahmanathaswami wrote: on mouseup set the textsize of me to 28 put the formattedheight of me into tTotalTextHeight put ( ( the height of me - tTotalTextHeight ) / 2) into tTopBottomMargins set topmargin of me to tTopBot

Re: Set Text to the Vertical Center of the field

2016-04-02 Thread J. Landman Gay
On 4/1/2016 11:08 PM, Sannyasin Brahmanathaswami wrote: on mouseup set the textsize of me to 28 put the formattedheight of me into tTotalTextHeight put ( ( the height of me - tTotalTextHeight ) / 2) into tTopBottomMargins set topmargin of me to tTopBottomMargins end mouseUp But it doesn't and th

Re: Set Text to the Vertical Center of the field

2016-04-02 Thread -hh
Scott R. wrote > Bernd N and I have been through this -- there's no reliable way to this, > unless you have a known number of lines, and a fixed point size, line > height, etc. Bernd wrote a method that uses the pixel rect of the text > via snapshot that can work. My solution is to use buttons si

Re: Set Text to the Vertical Center of the field

2016-04-01 Thread Scott Rossi
Bernd N and I have been through this -- there's no reliable way to this, unless you have a known number of lines, and a fixed point size, line height, etc. Bernd wrote a method that uses the pixel rect of the text via snapshot that can work. My solution is to use buttons since those can displa