RE: Vertically aligning text in a field

2014-12-19 Thread J. Landman Gay
The field topmargin maybe? On December 19, 2014 4:59:28 PM CST, BNig wrote: > >I have not tried this all on mobile devices. But on desktops the >baseline of >the first line is consistently found with this piece of code. I had the >need >for a starting point for a gradient behind the text and had

Re: Vertically aligning text in a field

2014-12-19 Thread Terence Heaford
Hi Bernd, Thanks very much for all your efforts, on first use there does not appear to be any issues. Thanks again Terry > On 19 Dec 2014, at 23:02, BNig wrote: > > Hi Terry, > > Look at my reply to Geoff. ___ use-livecode mailing list use-livec

Re: Vertically aligning text in a field

2014-12-19 Thread BNig
Hi Terry, Look at my reply to Geoff. I think this is more the solution you need because that code makes no assumptions about fixed textHeight, line wrapping and so on. It should work for any type of field and center what is visible vertically. Kind regards Bernd Terence Heaford wrote > Thank yo

RE: Vertically aligning text in a field

2014-12-19 Thread BNig
Hi Ralph, I have not tried this all on mobile devices. But on desktops the baseline of the first line is consistently found with this piece of code. I had the need for a starting point for a gradient behind the text and had difficulties finding a consitent reference point. I found the base line of

"Print link" in PDF using Images?

2014-12-19 Thread JOHN PATTEN
Hi All, Is it possible to use the rect of an image to create a link and have the image then become the link button? I’m trying to repeat through some images on a card and save them as links in the resulting PDF. get the ImageRect of img ("MasterVideoPlay" & x) of cd 5 put it into tR

Re: Vertically aligning text in a field

2014-12-19 Thread BNig
Hi Geoff, I think I found a solution for variable textHeight and different fonts in a field. Try this. It is now independent from the textHeight and just uses the formattedHeight. And no need to watch out for wrapped text. Should work with any text whose formattedRect and is reported correctly,

RELEASE: LiveCode 7.0.1

2014-12-19 Thread Benjamin Beaumont
Dear List Members, We're pleased to announce the release of LiveCode 7.0.1. This is a stable release focusing on product robustness and quality. We've been working for the last 10 weeks refining the 6.7 and 7.0 series, both of which we'll continue to support into 2015. LiveCode 7.0 also features a

RELEASE: LiveCode 6.7.1 GM1

2014-12-19 Thread Benjamin Beaumont
Dear List Members, We're pleased to announce the release of LiveCode 6.7.1 GM1. This is a maintenance release focusing on product robustness and quality. We've been working for the last 10 weeks refining the 6.7 series and will continue our support of this release series into 2015. *Release Conte

Re: Vertically aligning text in a field

2014-12-19 Thread BNig
Hi Geoff, both code versions were intended for fixedLineHeight text. But now you mention it I will try to adjust the code for variable lineHeight and varying fonts. Since am currently doing "cantuccini" (sort of italian cookies) I will try it a little later. I think the solution is not to rely o

Re: Vertically aligning text in a field

2014-12-19 Thread Terence Heaford
Hi Scott, Thanks for the feedback, noted to give your suggestion a try. All the best Terry > On 19 Dec 2014, at 20:35, Scott Rossi wrote: > > FWIW, I¹ve never been able to get the field adjustment code working for > anything but default text. I¹ve pretty much given up on using fields for > v

Re: Vertically aligning text in a field

2014-12-19 Thread Scott Rossi
Hi Terry: FWIW, I¹ve never been able to get the field adjustment code working for anything but default text. I¹ve pretty much given up on using fields for vertically centered text and use buttons where possible. Once you establish a topMargin offset to center the text (you can use a negative mar

RE: Vertically aligning text in a field

2014-12-19 Thread Ralph DiMola
I have been working on this for a while. I found out that the base line is different on various platforms. This makes the calculation change on various platforms. See bugs http://quality.runrev.com/show_bug.cgi?id=13551 and http://quality.runrev.com/show_bug.cgi?id=12176 . Ralph DiMola IT Director

Re: Scaling images and printing...

2014-12-19 Thread Scott Rossi
Hi Paul: If I understand what you are trying to do, here are a couple of suggestions. When first setting the fileName, also store this path in a custom property to be able to retrieve it later (such as the uFileName). Also, if possible, only set the imageData of the image to itself when printing;

Re: Vertically aligning text in a field

2014-12-19 Thread Terence Heaford
I think we are on a different wavelength here. The code I was originally using from the forum was: -- put the effective textSize of fld id tID into tTextSize -- put round (((tTextSize - 24) * 1/3)) into tOffset -- put the formattedheight of char 1 to - 1 of fld id tID into tFormat

Re: Vertically aligning text in a field

2014-12-19 Thread BNig
Thank Eric, Oh, I forgot about wrapping text. That is a neat addition. Actually I don't really use this myself, so I was thinking about something like small 3 - 5 lines of text in a separate field, not big wrapped text. Kind regards Bernd Eric Corbett wrote > This is great! > > Just change tex

Re: Vertically aligning text in a field

2014-12-19 Thread Geoff Canyon
What requirement am I missing that this isn't sufficient -- and capable of handling multiple fonts and font sizes throughout the text? get the formattedrect of line 1 to -1 of fld 1 set the topmargin of fld 1 to (the height of fld 1 - item 4 of it + item 2 of it) div 2 On Fri, Dec 19, 2014

Re: Vertically aligning text in a field

2014-12-19 Thread Terence Heaford
Thank you very much for this code. I was surprised that LC did not have an option for vertically aligned text in a field and on searching the forum found your method. However, on my iMac the offset calculation did not seem to work precisely and I had to adjust it slightly. As I am creating a r

Re: Vertically aligning text in a field

2014-12-19 Thread Eric Corbett
This is great! Just change text to formattedText for this line: > put the number of lines of the text of myFld into tNoOfLines See below - Eric On Dec 19, 2014, at 9:32 AM, BNig wrote: > here is a definitive (as opposed to infinitive) calculation that correctly > sets the positon of text ver

Re: Vertically aligning text in a field

2014-12-19 Thread BNig
here is a definitive (as opposed to infinitive) calculation that correctly sets the positon of text vertically in a field for testing purposes it is ready to be put into a slider optionally make three graphics to get visual feedback, see below watch out for line breaks --