Jump to content

Recommended Posts

Posted

Hi,

 

When i add some text to UniHtmlFrame.Html, and the VerticalBars is enabled, i need to be positioned at the last line of the UniHtmlFrame.

 

How do i positioning the last line of TUniHTMLFrame?

 

Thanks.

Posted

 

Hi,

 

I try use "ScrollTo" for TUniHtmlFrame.body too, but don't work, as example below:

 

UniSession.AddJS('MainForm.UniHtmlFrame.body.ScrollTo('+ QuotedStr('top') + ', 0)');

 

Occours an Ajax Error reporting that the method ScroolTo is unknown for the object.

 

Attached the image error.

 

How it should be correct?

 

Thanks

post-17-0-41359400-1332880305_thumb.jpg

Posted

It should be scrollTo() not ScrollTo().

 

"case sensitive".. thanks farshad..

But i need inform in pratice anything to always show the last text added in the TUniHtmlFrame.

I tried ("bottom", 0), but without success.

Some solution that i can to use as value for ("top", ?), for this need above?

 

Thanks again!

Posted

("top", 1000);

 

Hi farshad,

using ("top", 1000), he is always on the penultimate line, not in the last.. why?

i verified that any value above 100 he stay in penultimate line..

 

To test:

 

In runtime add several text until vertical bar stay enabled.

Source code:

begin

UniHtmlFrame1.Html.Add(UniEdit1.Text);

UniSession.AddJS('MainForm.UniHtmlFrame1.body.scrollTo("top",1000)');

end;

Posted

1000 is not exact value. It must be height of your control.

 

Try 2nd method I posted above.

 

Method 2 too stay same result.. may be an issue.. but, if possible, try to make the test to see in practice.

 

Thanks!!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...