Article View: comp.sys.next.programmer
Article #487Re: cells and highlighting
From: moose
Date: Thu, 06 Aug 1992 17:18
Date: Thu, 06 Aug 1992 17:18
35 lines
1830 bytes
1830 bytes
In article <1992Aug5.034851.14628@MITL.COM> edlau@mitl.com (Ed Lau) writes: > > Would someone please explain to me how a matrix accomplishes highlighting of a > cell? > > The documentation states that the contents of the cell is composited with > NX_HIGHLIGHT, but I couldn't find a description of NX_HIGHLIGHT anywhere. It > would seem to me that the AppKit handles the highlighting for you. However, in > one of the NeXT MiniExamples, the background color of a cell is chosen in the > code by checking the cFlags1.state and .highlighted bits. This suggests to me > that it is up to the programmer to implement highlighting. Who's right? > > On a related note, what happens to the cFlags1.state and cFlags1.highlighted > flags of a cell during and after a mouseDown:? According to OOP, none of your business what they are doing :->. Every cell has a routine called: - highlight:(const NXRect *)cellFrame inView:controlView lit:(BOOL)flag; which is used to highlight the cell. By using this with setState: you should be able to highlight the cells manually without worrying about the internal flags. Note: There are some problems using this with NXBrowsers under system 2.x, but it seems to work great under 3.0. -- Michael Rutman | moose@svcdudes.com Cubist | makes me a NeXT programmer Software Ventures | maker of MicroPhone II #include <std.disclaimer>
Technical Details
Message-ID:
<1992Aug6.171803.25061@svcdudes.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!psinntp!svc!newsReferences:
<1992Aug5.034851.14628@MITL.COM>Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!psinntp!svc!news From: moose@svcdudes.com Subject: Re: cells and highlighting Message-ID: <1992Aug6.171803.25061@svcdudes.com> Sender: news@svcdudes.com Reply-To: moose@svcdudes.com Organization: Software Ventures, Inc. References: <1992Aug5.034851.14628@MITL.COM> Distribution: na Date: Thu, 6 Aug 92 17:18:03 GMT Lines: 35