[comp.sys.mac.hypercard] Select line from a field when textLocked

geb@cadre.dsl.PITTSBURGH.EDU (Gordon E. Banks) (02/18/88)

I would like to be able to select an entire line from a text field
by clicking on the line with the browse tool.  I figured out
how to select any word (sending two clicks at the mouseloc when
click occurs), but have had trouble selecting an entire line.
Using the rect coordinates and dragging the mouse doesn't seem
to work for some strange reason.  Can anyone help?

edmoy@violet.berkeley.edu (02/19/88)

In article <993@cadre.dsl.PITTSBURGH.EDU> geb@cadre.dsl.pittsburgh.edu.UUCP (Gordon E. Banks) writes:
>I would like to be able to select an entire line from a text field
>by clicking on the line with the browse tool.  I figured out
>how to select any word (sending two clicks at the mouseloc when
>click occurs), but have had trouble selecting an entire line.
>Using the rect coordinates and dragging the mouse doesn't seem
>to work for some strange reason.  Can anyone help?

I remember having problem a similar problem with dragging the mouse over a
line of text, trying to select it.  I could get it to work either.  Fortunately,
there is another way.  Let x1 be the left side of the line, x2 the right side,
and y the vertical position of some spot in the line.  Then use:

	click at x1,y
	click at x2,y with shiftKey

This is the old extend-selection-with-shift-key trick.

One other note.  If you got x2 from the rect of the field, then you need
the subtract a pixel of two from it to make sure the coordinate is really
within the boundaries of the field.

Edward Moy
Workstation Software Support Group
University of California
Berkeley, CA  94720

edmoy@violet.Berkeley.EDU
ucbvax!violet!edmoy

davide@cs.qmc.ac.uk (David Edmondson) (02/23/88)

Keywords:


In article <993@cadre.dsl.PITTSBURGH.EDU> geb@cadre.dsl.pittsburgh.edu.UUCP (Gordon E. Banks) writes:
>I would like to be able to select an entire line from a text field
>by clicking on the line with the browse tool.

I couldn't work out why dragging didn't work either, however
you can use the rect of the field and click at one side then
click with shiftkey at the other (you have to subtract a bit if
it's a scrolling field).

While I'm here I may as well complain about date conversion to
UK format.  Converting anything to date produces a correct uk
date e.g. 4/1/88 (4th jan) however converting that to a long
date gives 1 April. This effectively stops the diary stack from
working correctly.

Cheers, Dave.