Path: utzoo!attcan!uunet!dino!ux1.cso.uiuc.edu!brutus.cs.uiuc.edu!apple!well!oster From: oster@well.sf.ca.us (David Phillip Oster) Newsgroups: comp.sys.mac.programmer Subject: Re: Changing the size of the scroll box. Message-ID: <19102@well.sf.ca.us> Date: 18 Jul 90 10:54:12 GMT References: <1757.269f272e@miavx1.acs.muohio.edu> Organization: Whole Earth 'Lectronic Link, Sausalito, CA Lines: 26 You want the ratio of the size of the thumb to the size of the scroll bar to equal the ratio of the size of the visible portion of the window to the total size of the window. This is a nice idea, since in the extreme cases, a very large document, so only a small portion is visible: the default size thumb is drawn, and a very small document, so it is entirely visible: the thumb fills the whole scroll bar, you give the user exactly what he is getting now. Unfortunately, The control manager's interface only provides SetCtlMin, SetCtlMax, and SetCtlValue. You could always implement your own control that had extra parameters in a structure off the Control's refcon (that way programs that look at your controls to send your window messages, like Apple's Virtual User test software would continue to work.) Don't forget, many programs calibrate their controls in lines (i.e., one click in the arrow move you up or down by one line) but the lines are variable width. (i.e., 100 4-point high lines, followed by 1 100-point high line. Since you must SetCtlMax to that when the Ctl is maxed out the end of the document just brushes the end of the window, you already have to worry about this non-linearity even with Apple's scroll bars. The point is, it isn't simple, and if you did it, it would only work in YOUR programs, and it is a lot of work. Go ahead. -- -- David Phillip Oster - Note new address. Old one has gone Bye Bye. -- oster@well.sf.ca.us = {backbone}!well!oster