Re: Find the scroll location in wrapped field

2014-11-19 Thread J. Landman Gay
On 11/19/2014, 6:36 AM, Mike Doub wrote: Some one posted a summary sizing of all of the different parts of a character. Unfortunately I can't find it. Now that I know about formattedrect I will give that a try for each char in a line and see if I can simulate the word wrapping of a line to get

Re: Find the scroll location in wrapped field

2014-11-19 Thread Mike Doub
I was hoping that the page ranges bug would get fixed. I am trying to do this myself but not being able to tell where soft line breaks occur has me blocked. Some one posted a summary sizing of all of the different parts of a character. Unfortunately I can't find it. Now that I know about form

Re: Find the scroll location in wrapped field

2014-11-19 Thread James Hale
> > I am trying to build a special purpose e-Book where the user can shrink and > expand the text as needed with everything scaling, looking really nice > with fluid page turning. > And this is why you want to locate the line. If I understand, you want the line that is positioned at the top of

Re: Find the scroll location in wrapped field

2014-11-19 Thread James Hale
> Are we referring to "spaceAbove" and "spaceBelow"? Proof that I rarely came across them :-) In my defense when I began doing what I was doing they had yet to be interpreted by the htmltext conversion. James ___ use-livecode mailing list use-livec

Re: Find the scroll location in wrapped field

2014-11-18 Thread dunbarx
All; Are we referring to "spaceAbove" and "spaceBelow"? Craig Newman -Original Message- From: James Hale To: use-livecode Sent: Tue, Nov 18, 2014 8:39 pm Subject: Re: Find the scroll location in wrapped field Ahh, bug http://quality.runrev.com/show_bug.cgi

Re: Find the scroll location in wrapped field

2014-11-18 Thread James Hale
Ahh, bug http://quality.runrev.com/show_bug.cgi?id=11688 I thought this had been fixed! I also seem to remember a longer discussion and an earlier bug report but perhaps I am mistaken. The discussion may have been on the forum. I rarely handle text that uses spacebefore and spaceafter and so ha

Re: Find the scroll location in wrapped field

2014-11-18 Thread dunbarx
fld 1 to pNum end doScroll -Original Message- From: J. Landman Gay To: How to use LiveCode Sent: Tue, Nov 18, 2014 2:38 pm Subject: Re: Find the scroll location in wrapped field On 11/18/2014, 1:08 PM, dunb...@aol.com wrote: > I tried a bunch of stuff like that; your thinking se

Re: Find the scroll location in wrapped field

2014-11-18 Thread Michael Doub
Life is good when you have fixed line heights, dontwrap or listbehavior and you don't use spacebefore, spaceafter or imageSource As you might expect, I live in opposite world: with multiple fonts, text sixes, spacebefore, spaceafter, word wrap and imageSource. (I am trying to build a special

Re: Find the scroll location in wrapped field

2014-11-18 Thread J. Landman Gay
On 11/18/2014, 1:08 PM, dunb...@aol.com wrote: I tried a bunch of stuff like that; your thinking seems sound. I thought mine did as well. Sometimes it sets a line properly, and sometimes, especially with small textSize lines near large ones, not at all. In fact, several lines away. I am stil

Re: Find the scroll location in wrapped field

2014-11-18 Thread dunbarx
fld 1 into tScroll set the vscroll of fld 1 to (tScroll-tHt-the topmargin of fld 1) -Original Message- From: Richard Gaskin To: use-livecode Sent: Tue, Nov 18, 2014 10:15 am Subject: Re: Find the scroll location in wrapped field dunbarx wrote: >> James Hale wrote: >&

Re: Find the scroll location in wrapped field

2014-11-18 Thread Richard Gaskin
Michael Doub wrote: > I don't think the solution works because of a bug in livecode where > spacebefore and spaceafter are not taken into account. Thanks - I wasn't aware of that bug, but was able to find it: Hopefully it'll get addressed for 6.

Re: Find the scroll location in wrapped field

2014-11-18 Thread Michael Doub
Richard, I don't think the solution works because of a bug in livecode where spacebefore and spaceafter are not taken into account. This is the problem: put the formattedHeight of line 1 to tLOS of fld 1 into tScroll I just posted my solution in the forums and I had to manually add them in.

Re: Find the scroll location in wrapped field

2014-11-18 Thread Eric Corbett
I knew you could select the line number, but I did not know starting at the end would provide the best results. This will be helpful, thanks. One method I have used in the past is to put the htmlText of the field into a variable, then put line 1 to (the line to scroll to) into the field (or dele

Re: Find the scroll location in wrapped field

2014-11-18 Thread Richard Gaskin
dunbarx wrote: >> James Hale wrote: >> >> So if you have the linenumber of the line contains the text you wish >> to see at the top of the field then... >> >>select line -1 of field "TextToScroll" >>select line linenumber of field "TextToScroll" >> >> And line linenumber will now be at

Re: Find the scroll location in wrapped field

2014-11-18 Thread dunbarx
foundline can be used to set the line selection. But his data was with mixed textSizes, and that is how this all started. Craig Newman -Original Message- From: James Hale To: use-livecode Sent: Tue, Nov 18, 2014 12:19 am Subject: Re: Find the scroll location in wrapped field As

Re: Find the scroll location in wrapped field

2014-11-17 Thread James Hale
As per the forum discussion, if you want the desired text to scroll to the top of the field you simply need to scroll first to the bottom of the field. Selecting line x of a field instructs the engine to scroll the field contents until line x is visible. As the engine stops as soon as the desir

Re: Find the scroll location in wrapped field

2014-11-17 Thread dunbarx
line has a different textHeight. You should monitor that thread. Anyway, this works. Craig Newman -Original Message- From: Michael Doub To: How To use LiveCode use LiveCode Sent: Mon, Nov 17, 2014 10:27 am Subject: Find the scroll location in wrapped field If I have a single line that is wit

Find the scroll location in wrapped field

2014-11-17 Thread Michael Doub
If I have a single line that is within a non fixed line height field that is word wrapped. How does one find the amount to set the vScroll if the word has been wrapped? I am trying to set the scroll so the word is positioned as the first visible line. Thanks Mike __