cristianotestai Posted March 22, 2012 Posted March 22, 2012 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. Quote
Javi Posted March 23, 2012 Posted March 23, 2012 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 Quote
cristianotestai Posted March 27, 2012 Author Posted March 27, 2012 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 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 Quote
Administrators Farshad Mohajeri Posted March 28, 2012 Administrators Posted March 28, 2012 It should be scrollTo() not ScrollTo(). Quote
cristianotestai Posted March 28, 2012 Author Posted March 28, 2012 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! Quote
Administrators Farshad Mohajeri Posted March 28, 2012 Administrators Posted March 28, 2012 ("top", 1000); Quote
Administrators Farshad Mohajeri Posted March 28, 2012 Administrators Posted March 28, 2012 Also this: var xx=MainForm.UniHTMLFrame1.el.child(".x-panel-body").dom;xx.scrollTop=xx.scrollHeight; Quote
Administrators Farshad Mohajeri Posted March 28, 2012 Administrators Posted March 28, 2012 Actually what you need is TUniHTMLEditorFrame which will be available in next release. Quote
cristianotestai Posted March 28, 2012 Author Posted March 28, 2012 ("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; Quote
Administrators Farshad Mohajeri Posted March 28, 2012 Administrators Posted March 28, 2012 1000 is not exact value. It must be height of your control. Try 2nd method I posted above. Quote
cristianotestai Posted March 28, 2012 Author Posted March 28, 2012 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!! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.