ark%ritcv@cs.rit.edu (03/16/89)
I am writing an application that uses the List Manager to display a two- dimensional array of cells in a window. I set up the list with both a horizontal scroll bar (underneath the list) and a vertical scroll bar (to the right of the list). What I want to do is display some labels in the window that are not part of the actual list: row numbers to the left of the list and column numbers above the list. Furthermore, when I scroll the list I want these labels to change, so they always show the correct row and column numbers. According to IM Vol. IV, p. 273, under the documentation for the LClick routine that one calls when a mouse-down event occurs in the list: "LClick keeps control until the mouse is released; each time through its inner loop, it calls the routine whose pointer is in the lClikLoop field of the list record." Okay, I wrote a routine to redraw the labels around the list, and stuck a pointer to that routine in the ListRec's lClikLoop field when I created the list. It doesn't work right. When I click and hold the mouse button while the cursor is in one of the list cells, and my program calls LClick, the cell gets selected. As I drag the cursor into other cells while holding the button down, the selection changes. As I drag the cursor outside the list's display rectangle, the list auto- scrolls. As the list auto-scrolls, my label-drawing click loop routine gets called, and the labels "scroll" to stay synchronized with the list. This part works exactly as I expected. HOWEVER... When I click and hold the mouse button while the cursor is in one of the list's *scroll bars,* the list cells scroll as long as I hold the button down. BUT MY LABEL-DRAWING CLICK LOOP ROUTINE DOES NOT GET CALLED, AND THE LABELS DO NOT STAY SYNCHRONIZED WITH THE LIST. Can someone tell me how to get my click loop routine called when I'm clicking in the scroll bars? (Or is this a bug in the List Manager?) I'm using a Mac SE, System 4.2, MPW 2.0, and TML Pascal II. Alan Kaminsky P. O. Box 9887 School of Computer Science Rochester, NY 14623 Rochester Institute of Technology 716-475-5255 ark@cs.rit.edu