Anchors on the same page are no problem. You could still do the steps 1 to 5 below and whether the anchor is on the same page or not it would work. However step 2 would be a waste of processing power if the anchor is already on the same page, in that case just omit steps 2 and 3.

1. Split the url/anchor and remove the # from the anchor value.
2. Pass the url only to your open html procedure.
3. Call Application.ProcessMessages;
4. Call .Scroll(hsaEnd) on the html panel
5. Call .MakeAnchorVisible(anchor value without #) on the html panel.

On 10/05/15 11:15, Giuliano Colla wrote:
Il 09/05/2015 20:40, Martin ha scritto:
To get an anchor link to show correctly (e.g. somefile.html#readthisbit), I discovered you need to do the following - note the magic moment is at step 3.

Thanks a lot for the tip.
Unfortunately what I need is to provide a link to anchors on the same page. Meaning that I should implement something of the sort you suggest within the ipro code, provided I find my way in the sources....

You gave me a clue, I'll try to take advantage of it.

Giuliano



--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to