🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #16740

Graying Out Text Items

#16740
From: rs4u+
Date: Fri, 12 Jun 1987 12:21
29 lines
1165 bytes
I don't think it's necessary to define a UserItem to
gray out an item. The following bit shuld work:

PROCEDURE GrayDItem(d:DialogPtr; item:Integer);
VAR
	itemType : Integer;
	itemHand : Handle;
	itemRect : Rect;
	pState : PenState;

BEGIN
	GetPenState(pState); {save the pen's state}
	GetDItem(d, item, itemType, itemHandle, itemRect);
		{Get the dialog item}

	PenPat(gray);
	PenMode(PatBic);	{set gray pen, PatBic drawing mode}

	PaintRect(itemRect);	{gray out the item}

	SetPenState(pState);	{restore the pen's state}
END;

This way, you don't need any UserItems, nor do you
have to worry about placing the items in correct order.

		--Rich
ig
Technical Details
Message-ID: <cUnz9Qy00UhTNoY1YA@andrew.cmu.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!rutgers!ames!ucbcad!ucbvax!ANDREW.CMU.EDU!rs4u+

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!rutgers!ames!ucbcad!ucbvax!ANDREW.CMU.EDU!rs4u+
From: rs4u+@ANDREW.CMU.EDU.UUCP
Newsgroups: comp.sys.mac
Subject: Graying Out Text Items
Message-ID: <cUnz9Qy00UhTNoY1YA@andrew.cmu.edu>
Date: Fri, 12-Jun-87 08:21:48 EDT
Article-I.D.: andrew.cUnz9Qy00UhTNoY1YA
Posted: Fri Jun 12 08:21:48 1987
Date-Received: Sat, 13-Jun-87 20:01:54 EDT
Sender: daemon@ucbvax.BERKELEY.EDU
Lines: 29