Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!sri-spam!mordor!lll-tis!ames!oliveb!pyramid!voder!apple!dowdy From: dowdy@apple.UUCP (Tom Dowdy) Newsgroups: comp.sys.mac Subject: Drawing Lines in Dialogs Message-ID: <1256@apple.UUCP> Date: Thu, 2-Jul-87 13:30:35 EDT Article-I.D.: apple.1256 Posted: Thu Jul 2 13:30:35 1987 Date-Received: Sat, 4-Jul-87 08:23:28 EDT Organization: Apple Computer, Inc., Cupertino, USA Lines: 30 Keywords: drawing tricks dialogs Today I was working on a dialog that needed some standard Gray lines (horizontal and vertical) to separate portions of the dialog. I was going to use a UserItem but I asked someone else what they thought. They told me to use a PICT resource to do it. It's very simple. You have two PICT resources, one contains a vertical grey line, one a horizonal (I used MacDraw to create them). When you need a line in your dialog, you simply put the PICT in your DITL, and drag it(With ResEdit) to the desired size. Voila! Instant line. It's actually much better than a UserItem (most notably in a modeless dialog) as it gets updated for you, plus you don't have any extra code overhead for getting the item and drawing it. Plus, if you wanted to change it to a different pattern, thickness, what have you, it would be simple. (Users could even change it to a frilly boarder if that amused them) If you need odd shapes, four PICTs are required, one horizonal, one vertical and 45 degree left and right angles. With these you should be able to construct any basic line figure. You learn something new every day. Tom Dowdy CSNET: dowdy@apple.CSNET Apple Computer MS:27Y AppleLink:DOWDY1 20525 Mariani Ave UUCP: {sun,voder,amdahl,decwrl}!apple!dowdy Cupertino, CA 95014 "Plus ca change, Plus c'est la meme chose."