Re: NSControl objects on a custom view
Hi Jens, thanks for the answer. If you drag an NSTextfield on your custom view in Interface Builder, doesn't it become a subview automatically? On 11 Jun 2010, at 19:03, Jens Alfke wrote: On Jun 11, 2010, at 7:04 AM, Florian Soenens wrote: When i put default buttons or a NSSearchfield or a NSProgressindicator on top of my custom view, the subitems display a background. By “on top of”, do you mean they’re subviews of your custom view, or siblings that are just positioned in the same place? If you make the controls subviews, they should draw correctly. Overlapping sibling views didn’t use to work correctly back in the day; I think they’re supposed to now, but you might be hitting an edge case. I think it’s generally better to make the controls subviews if they’re logically “inside” your view. —Jens Looking for Web-to-Print Solutions? Visit our website : http://www.vit2print.com This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information and/or information protected by intellectual property rights. If you are not the intended recipient, please note that any review, dissemination, disclosure, alteration, printing, copying or transmission of this e-mail and/or any file transmitted with it, is strictly prohibited and may be unlawful. If you have received this e-mail by mistake, please immediately notify the sender and permanently delete the original as well as any copy of any e-mail and any printout thereof. We may monitor e-mail to and from our network. NSS nv Tieltstraat 167 8740 Pittem Belgium ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSControl objects on a custom view
On 14 Jun 2010, at 10:54, Florian Soenens wrote: Hi Jens, thanks for the answer. If you drag an NSTextfield on your custom view in Interface Builder, doesn't it become a subview automatically? Yes it does. In Xcode shift + right mouse click on a view to see the view hierarchy. Regards Jonathan Mitchell Developer Mugginsoft LLP http://www.mugginsoft.com On 11 Jun 2010, at 19:03, Jens Alfke wrote: On Jun 11, 2010, at 7:04 AM, Florian Soenens wrote: When i put default buttons or a NSSearchfield or a NSProgressindicator on top of my custom view, the subitems display a background. By “on top of”, do you mean they’re subviews of your custom view, or siblings that are just positioned in the same place? If you make the controls subviews, they should draw correctly. Overlapping sibling views didn’t use to work correctly back in the day; I think they’re supposed to now, but you might be hitting an edge case. I think it’s generally better to make the controls subviews if they’re logically “inside” your view. —Jens Looking for Web-to-Print Solutions? Visit our website : http://www.vit2print.com This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information and/or information protected by intellectual property rights. If you are not the intended recipient, please note that any review, dissemination, disclosure, alteration, printing, copying or transmission of this e-mail and/or any file transmitted with it, is strictly prohibited and may be unlawful. If you have received this e-mail by mistake, please immediately notify the sender and permanently delete the original as well as any copy of any e-mail and any printout thereof. We may monitor e-mail to and from our network. NSS nv Tieltstraat 167 8740 Pittem Belgium ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/jonathan%40mugginsoft.com This email sent to jonat...@mugginsoft.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSControl objects on a custom view
Then my NSTextField is a subview of my custom view but still displays with a background, that's the behavior i don't want. Can this be fixed somehow? On 14 Jun 2010, at 12:03, jonat...@mugginsoft.com wrote: On 14 Jun 2010, at 10:54, Florian Soenens wrote: Hi Jens, thanks for the answer. If you drag an NSTextfield on your custom view in Interface Builder, doesn't it become a subview automatically? Yes it does. In Xcode shift + right mouse click on a view to see the view hierarchy. Regards Jonathan Mitchell Developer Mugginsoft LLP http://www.mugginsoft.com On 11 Jun 2010, at 19:03, Jens Alfke wrote: On Jun 11, 2010, at 7:04 AM, Florian Soenens wrote: When i put default buttons or a NSSearchfield or a NSProgressindicator on top of my custom view, the subitems display a background. By “on top of”, do you mean they’re subviews of your custom view, or siblings that are just positioned in the same place? If you make the controls subviews, they should draw correctly. Overlapping sibling views didn’t use to work correctly back in the day; I think they’re supposed to now, but you might be hitting an edge case. I think it’s generally better to make the controls subviews if they’re logically “inside” your view. —Jens Looking for Web-to-Print Solutions? Visit our website : http://www.vit2print.com This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information and/or information protected by intellectual property rights. If you are not the intended recipient, please note that any review, dissemination, disclosure, alteration, printing, copying or transmission of this e-mail and/or any file transmitted with it, is strictly prohibited and may be unlawful. If you have received this e-mail by mistake, please immediately notify the sender and permanently delete the original as well as any copy of any e-mail and any printout thereof. We may monitor e-mail to and from our network. NSS nv Tieltstraat 167 8740 Pittem Belgium ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/jonathan%40mugginsoft.com This email sent to jonat...@mugginsoft.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/florian.soenens%40nss.be This email sent to florian.soen...@nss.be Looking for Web-to-Print Solutions? Visit our website : http://www.vit2print.com This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information and/or information protected by intellectual property rights. If you are not the intended recipient, please note that any review, dissemination, disclosure, alteration, printing, copying or transmission of this e-mail and/or any file transmitted with it, is strictly prohibited and may be unlawful. If you have received this e-mail by mistake, please immediately notify the sender and permanently delete the original as well as any copy of any e-mail and any printout thereof. We may monitor e-mail to and from our network. NSS nv Tieltstraat 167 8740 Pittem Belgium ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSControl objects on a custom view
On 14 Jun 2010, at 12:28, Florian Soenens wrote: Then my NSTextField is a subview of my custom view but still displays with a background, that's the behavior i don't want. Can this be fixed somehow? On 14 Jun 2010, at 12:03, jonat...@mugginsoft.com wrote: Do you want the gradient to show through the NSTextField? I can place an NSSearchField on a gradient background and the redraw is fine. In your gradient view make sure that you are dealing with the invalidated rect of - drawRect: correctly. By default your receive the invalidated rect - which may be the view frame. When you click on the NSSearchField the superview will be requested to redraw the background behind the NSSearchField. If your gradient view simply fills the NSRect it receives in - drawRect: this will have the effect of generating a smaller gradient behind the NSSearchField. Regards Jonathan Mitchell Developer Mugginsoft LLP http://www.mugginsoft.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSControl objects on a custom view
That's what i thought at first, but i seem to fill the whole [self bounds] with the gradient. On a sidenote, if i put a custom NSSearchfield onto my custom gradient view, the behavior is more obvious then with a default NSSearchfield, am i overlooking something in the NSSearchFieldCell behavior also? On 14 Jun 2010, at 13:47, jonat...@mugginsoft.com wrote: On 14 Jun 2010, at 12:28, Florian Soenens wrote: Then my NSTextField is a subview of my custom view but still displays with a background, that's the behavior i don't want. Can this be fixed somehow? On 14 Jun 2010, at 12:03, jonat...@mugginsoft.com wrote: Do you want the gradient to show through the NSTextField? I can place an NSSearchField on a gradient background and the redraw is fine. In your gradient view make sure that you are dealing with the invalidated rect of - drawRect: correctly. By default your receive the invalidated rect - which may be the view frame. When you click on the NSSearchField the superview will be requested to redraw the background behind the NSSearchField. If your gradient view simply fills the NSRect it receives in - drawRect: this will have the effect of generating a smaller gradient behind the NSSearchField. Regards Jonathan Mitchell Developer Mugginsoft LLP http://www.mugginsoft.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/florian.soenens%40nss.be This email sent to florian.soen...@nss.be Looking for Web-to-Print Solutions? Visit our website : http://www.vit2print.com This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information and/or information protected by intellectual property rights. If you are not the intended recipient, please note that any review, dissemination, disclosure, alteration, printing, copying or transmission of this e-mail and/or any file transmitted with it, is strictly prohibited and may be unlawful. If you have received this e-mail by mistake, please immediately notify the sender and permanently delete the original as well as any copy of any e-mail and any printout thereof. We may monitor e-mail to and from our network. NSS nv Tieltstraat 167 8740 Pittem Belgium ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSControl objects on a custom view
On 14 Jun 2010, at 13:02, Florian Soenens wrote: That's what i thought at first, but i seem to fill the whole [self bounds] with the gradient. On a sidenote, if i put a custom NSSearchfield onto my custom gradient view, the behavior is more obvious then with a default NSSearchfield, am i overlooking something in the NSSearchFieldCell behavior also? I think we need to see some code and images. Regards Jonathan Mitchell Developer Mugginsoft LLP http://www.mugginsoft.com___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSControl objects on a custom view
On Jun 11, 2010, at 7:04 AM, Florian Soenens wrote: When i put default buttons or a NSSearchfield or a NSProgressindicator on top of my custom view, the subitems display a background. By “on top of”, do you mean they’re subviews of your custom view, or siblings that are just positioned in the same place? If you make the controls subviews, they should draw correctly. Overlapping sibling views didn’t use to work correctly back in the day; I think they’re supposed to now, but you might be hitting an edge case. I think it’s generally better to make the controls subviews if they’re logically “inside” your view. —Jens___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com