table format in Rev 2

Jan Schenkel janschenkel at yahoo.com
Sun Apr 13 05:00:01 EDT 2003


--- Yves COPPE <yvescoppe at skynet.be> wrote:
> >
> >Hi Yves,
> >
> >My apologies for not aving reacted sooner ; project
> >gobbling up all my time and my beloved likes to
> spend
> >time with me as well, it seems  *chuckle*
> >At any rate, let's se what we can do :
> >
> >1) try something like this
> >
> >on returnInField
> >   put word 2 of the selectedLine into tCurrentLine
> >   if tLine = the number of lines of me then beep
> >   else select before line tCurrentLine + 1 of me
> >end returnInField
> >
> >on tabKey
> >   put word 2 of the selectedLine into tCurrentLine
> >   -- NOTE :: easiest with a custom property
> >   --         named uNextField for your field
> >   put the uNextField of me into tNextField
> >   select before line tCurrentLine of fld
> tNextField
> >end tabKey
> >
> 
> 
> I get trouble with scroll problem and returninfield
> I have to synchronize the scroll of my 3 flds
> Idem when I scroll the fld "3" : I use a
> scrolldagbar handler
> 
> How can I synchronize the scroll of hte other flds,
> when I hit the 
> returnKey in one of the 3 flds ?
> 
> Thank you
> -- 
> Greetings.
> 
> Yves COPPE

Hi Yves,

This is quick-and-dirty, but placing it in the group
script ought to do the trick :

on rawKeyDown pWhichKey
  put the short ID of the target into tTargetID
  send "SynchroniseScrolls" && tTargetID to me \
      in 5 milliseconds
  pass rawKeyDown
end rawKeyDown

on SynchroniseScrolls pTargetID
  put the scroll of fld ID pTargetID into tScroll
  set the scroll of fld 1 to tScroll
  -- ... the rest of the fields ...
end SynchroniseScrolls

Of course you can reuse this SynchroniseScrolls in
other bits as well.

Hope this helped,

Jan Schenkel.

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com



More information about the use-livecode mailing list