Thread View: comp.sys.next.programmer
3 messages
3 total messages
Started by Don McGregor
Tue, 07 Apr 1992 06:00
NXBrowser highlighting probs
Author: Don McGregor
Date: Tue, 07 Apr 1992 06:00
Date: Tue, 07 Apr 1992 06:00
23 lines
1453 bytes
1453 bytes
I've got a problem with a subclass of NXBrowserCell. I've reimplemented the drawInside:inView: method and am using it in a normal NXBrowser. The highlighting of selected cells seems to work inconsistently. I can select a cell fine the first time, and then I can deselect it. Highlighting works correctly in both instances. But after that, I can't highlight the cell again. The cell is being selected OK (I can tell because the next column in the NXBrowser is changing) but the cell isn't being highlighted after the first selection. The relevant code in the drawInside:inView: method looks like PSsetgray((cFlags1.highlighted || cFlags1.state) ? NX_WHITE : NX_LTGRAY); NXRectFill(cellFrame); Can anyone point me in the direction of what might be causing something like this? -- Don McGregor | "I like maxims that don't encourage behavior mcgredo@bluto.ie.orst.edu| modification" --Calvin
Re: NXBrowser highlighting probs
Author: Alex Senkevitch
Date: Tue, 07 Apr 1992 23:10
Date: Tue, 07 Apr 1992 23:10
17 lines
1060 bytes
1060 bytes
In article <1992Apr7.060045.3044@talon.ucs.orst.edu> mcgredo@bluto.ie.orst.edu (Don McGregor) writes: > > I've got a problem with a subclass of NXBrowserCell. > > I've reimplemented the drawInside:inView: method and am using it in a normal > NXBrowser. The highlighting of selected cells seems to work inconsistently. > The relevant code in the drawInside:inView: method looks like > > PSsetgray((cFlags1.highlighted || cFlags1.state) ? NX_WHITE : NX_LTGRAY); > NXRectFill(cellFrame); Try switching NX_WHITE and NX_LTGRAY... J. Alexander Jamison Sr. Systems Engineer Talus Imaging and Communications Corp.
Re: NXBrowser highlighting probs
Author: Ray Spalding
Date: Fri, 10 Apr 1992 17:49
Date: Fri, 10 Apr 1992 17:49
22 lines
1331 bytes
1331 bytes
In article <1992Apr7.060045.3044@talon.ucs.orst.edu> mcgredo@bluto.ie.orst.edu writes:
>I've got a problem with a subclass of NXBrowserCell.
>I've reimplemented the drawInside:inView: method and am using it in a normal
>NXBrowser. The highlighting of selected cells seems to work inconsistently.
I had the same problem. My workaround was to override the
highlight:inView:lit: method, also--
- highlight:(const NXRect *)cellFrame inView:controlView lit:(BOOL)lit
{
cFlags1.highlighted = lit != 0;
[self drawSelf:cellFrame inView:controlView];
return self;
}
It appears that the NXBrowserCell method of the same name doesn't
use drawInside:inView:
--
Ray Spalding, Technical Services, Office of Information Technology
Georgia Institute of Technology, Atlanta Georgia, 30332-0715
uucp: ...!{allegra,amd,hplabs,ut-ngp}!gatech!prism!cc100aa
Internet: cc100aa@prism.gatech.edu
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads