How do I stop a table field from scrolling right?

Ken Ray kray at sonsothunder.com
Wed Jul 9 11:27:11 EDT 2008


> A fountain of knowledge are you.  I was afraid of that.

The problem is due to the field's 'margins' property, which default to '8'.
When Rev goes to draw an "editing" field on top of the table field when you
click in the 4th column, it checks to see if the right side of the editing
field goes beyond the right edge of the table field, *minus* the margin
setting.

You could, of course, set the margins to be less than 8, but then that
screws up the look of your table and the way Rev draws the editing field.

Luckily, though, you can change the way the Rev IDE handles this (and by
extension your standalone) by making some minor changes in the 'revTable'
frontscript:

1) Make sure that "Revolution UI Elements in Lists" is checked under the
View menu.

2) Open the Message Box and click the "frontScripts" button (the 6th button
from the left, right after the mailbox icon).

3) In the list below, it should show:   `button "revTable"`, double-click on
it to open its script.

4) In the script it displays, locate the "revCalculateCellRect" handler.

5) Make the script change below (watch word wraps!):

Locate the line that says:

  if trightrect > (the cREVTable["rightfieldloc"] of pObject - the
cREVTable["scrollbarwidth"] of pObject - tfudge)

Change it to:

  if trightrect > (the cREVTable["rightfieldloc"] of pObject - the
cREVTable["scrollbarwidth"] of pObject) then

6) Save and close the script.

7) Switch to browse tool, and test.

8) Save the changes to the IDE by executing the following code in the
Message Box:

  save stack "revLibrary"

This should now allow you to make a standalone that includes the changes,
IIRC.

Hope this helps,

Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/





More information about the use-livecode mailing list