[fa.info-mac] deactivating scroll bars

info-mac@uw-beaver (info-mac) (12/03/84)

From: David.Anderson@CMU-CS-K.ARPA
HideControl actually makes the control disappear from the screen, and
that probably isn't what you want to do in order to make a control
appear inactive.  To get a scroll bar to look inactive (thumb gone,
scroll bar area white, etc) use HiliteControl with a value of 255.
I want my scroll bars to be inactive when (1) the window isn't active,
or (2) when there isn't enough data to scroll (everything is currently
visable).  My code looks like this:

activateEvent(how)
int how;
{
	register i;

	if (how & activeFlag) {
	    active = TRUE;
	    HiliteControl(periodScroll, 0);
	    for (i=0; i<8; i++) HiliteControl(maskButton[i], 0);
	}
	else {
	    active = FALSE;
	    HiliteControl(periodScroll, 255);
	    for (i=0; i<8; i++) HiliteControl(maskButton[i], 255);
	}
}