lipa@POLYA.STANFORD.EDU (William Lipa) (05/16/88)
I am using the List Manager to display a two-dimensional list with single characters in it. I want the user to be able to select disjoint rectangles of cells in this list, in the same way that the Finder works when you select icons with the box while holding down the shift key. I cannot seem to get this to work. In particular, when you hold the shift key down and sweep out a rectangle, and then return the cursor to the point where you originally clicked, the rectangle does not shrink. The selected rectangle stays stuck at its maximum extent. Inside Mac IV seems to say this should be possible. On page 266, it says, "...the List Manager expands AND SHRINKS a selected rectangle that's defined by the mouse location and the 'anchor'...". Am I doing something wrong, or is it the fault of the List Manager? Bill Lipa lipa%polya@forsythe.stanford.edu PS. This is with the lNoExtend bit set to allow disjoint rectangles.
jdm@ut-emx.UUCP (Jim Meiss) (05/17/88)
I wrote a program that uses the List Manager in a vanilla fashion, and have no problems with the shift-drag procedure. Here's the LSC code I use to handle mouse downs in the list: -------------- static ListHandle ListH; static Cell theCell; myclick(where,modifiers) /*Mouse Click in ListWindow*/ Point where; int modifiers; { ListH = (**thewList).ListH; /*handle to List in active window*/ SetPort((**thewList).ListW); GlobalToLocal(&where); if(LClick(where,modifiers,ListH)) /*there has been a double click */ { theCell.v = HiWord(LLastClick(ListH)); theCell.h=MAXCOLS+1; while(theCell.h-- >0) LSetSelect(TRUE,theCell,ListH); } if(PtInRect(where,&(**ListH).rView)) displayEdit('\0'); /*Display editText dialog*/ } --------------- Hope this helps. Jim Meiss jdm@emx.utexas.edu jdm%uta.MFENET@nmfecc.ARPA -------------------------------------------------------------------------