Re: NSView and rectangle management
Re: NSView and rectangle management
- Subject: Re: NSView and rectangle management
- From: Paul Fox <email@hidden>
- Date: Tue, 25 Jun 2002 16:09:00 +0100
>
On Tuesday, June 25, 2002, at 04:05 PM, Paul Fox wrote:
>
>
>
>
>>
>
>> On Tuesday, June 25, 2002, at 02:35 PM, Paul Fox wrote:
>
>>
>
>>> I have a question regarding NSView and children subviews. When
>
>>> I draw into an NSView (either via drawRect: or lockFocus) the children
>
>>> get stomped on.
>
>>>
>
>>> [...]
>
>>>
>
>>> I am trying hard not to smash my machine to bits and give up on Cocoa
>
>>> as it is so badly and fundamentally flawed. Can anyone suggest what
>
>>> to do or which docs to read? I have exhausted the Apple docs and the
>
>>> web (and the mailing list).
>
>>
>
>> Is it not possible to just use a NSScrollView and embed your custom
>
>> view
>
>> in it?
>
>
>
> Unless I am mistaken - this is not generic enough. In this specific
>
> case a scrollview might suffice but what if I have other NSView which
>
> are not scrollers?
>
>
It depends on your layout.
>
>
If you have something like this:
>
>
+--------------------------+-+
>
| |^|
>
| +-+
>
| View |S|
>
| |c|
>
| |r|
>
| |o|
>
| |l|
>
| +-+
>
| |V|
>
+---------+-+------------+-+-+
>
| View 2 |<| Scroll |>|/|
>
+---------+-+------------+-+-+
>
>
It's just a custom View embedding 2 ScrollBars and 2 custom views,
>
there's not clipping issue except for the frame.
>
-------------------------------
| |
| |
| |
| ___ ___ ___ |
| | | | | | | |
| |___| |___| |___| |
| |
| |
| |
| |
| |
| |
-------------------------------
How about this one then? I want something generic!
regards
+-------------------------------------------------------------------------+
| CRiSP - Flexible editor | CRiSP, syn. for BRIEF |#
| | Internet: email@hidden |#
| If you get no reply for | WWW: (mine)
http://www.crisp.demon.co.uk |#
| support, please check your | WWW:
http://www.crisp.com |#
| Reply-To: email address. | WWW:
http://www.pacemaker.co.uk |#
+-------------------------------------------------------------------------+#
###########################################################################
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.