Jump to content

UniHtmlFrame


cristianotestai
 Share

Recommended Posts

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.

 

You look at this, maybe is good for you

 

http://forums.unigui.com/index.php?/topic/1616-scroll-position/page__p__6599__hl__scrollto__fromsearch__1#entry6599

Link to comment
Share on other sites

 

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

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

("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;

Link to comment
Share on other sites

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.

 Share

×
×
  • Create New...