getScrollY() returns incorrect value for large content

Discuss all problems you have with Servoy here. It might help to mention the Servoy version and Operating System version you are using

getScrollY() returns incorrect value for large content

Postby ylockson » Thu Sep 05, 2013 10:06 am

Given a block of text, I need to divide it into smaller ones that best fit in an HTML field (like page formatting).

What I did:
1. Created a field (named fld) of the required size & of type HTML Area
2. Gave it a form variable (named dp) as data provider
3. Read the block of text from the database and placed it in dp
4. The code looks as follows:

// assign block read from database to data provider dp here...
elements.fld.setScroll(0, 1000000); // give it an arbitrarily high Y value
if (elements.fld.getScrollY() > 0) {
// Text does not fit. Perform paging routine here...
}

5. getScrollY() works fine except if the given block is too big (i.e. exceeds a certain arbitrary size - I noticed that it can return values as high as about 4400 but beyond that it returns 0).
ylockson
 
Posts: 59
Joined: Thu Mar 01, 2012 8:40 am

Return to Discuss possible Issues and Bugs

Who is online

Users browsing this forum: No registered users and 14 guests

cron