AjusteScroll for all textheight

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

AjusteScroll for all textheight

Post by jmburnod » Sat May 29, 2010 7:35 pm

Hi All,

I have a script to ajust the scroll of a field to avoid middle line
It work fine with a textheight 18 but not with all textSizes

Code: Select all

on AjustScroll f --•• avoid middle line
   put the textheight of fld f into LeLS2
   put the scroll of fld f into CurScroll
   put round(CurScroll/LeLS2) into nb
   put round(nb*LeLS2) into LeScroll
   set the scroll of fld f to LeScroll
end AjustScroll
I am sure that you have an idea
Thank one more

Jean-Marc
https://alternatic.ch

Curry
Posts: 111
Joined: Mon Oct 15, 2007 11:34 pm
Contact:

Re: AjusteScroll for all textheight

Post by Curry » Sun May 30, 2010 1:55 am

Gotta calculate margins too.
Best wishes,

Curry Kenworthy

LiveCode Development, Training & Consulting
http://livecodeconsulting.com/

WordLib: Conquer MS Word & OpenOffice
SpreadLib: "Excel-lent" spreadsheet import/export
http://livecodeaddons.com/

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: AjusteScroll for all textheight

Post by jmburnod » Sun May 30, 2010 6:47 pm

Hi Curry,

Thank for reply but the margins = 0

Jean-Marc
https://alternatic.ch

Post Reply