Re: how to add a custom view (a pair of controls) to an NSToolbar in Interface Builder

2010-11-29 Thread Joey Hagedorn
Rua,
This won't work with an instance of  the custom view in the toolbar. 
A workaround would be to use a borderless (Custom / No Border) NSBox instead of 
a custom view. This is probably the most straightforward fix.

There is some more info in this older post to the list: 
http://www.cocoabuilder.com/archive/cocoa/236455-nstoolbaritem-with-custom-view-in-interface-builder-3-leopard.html

--Joey



On Nov 22, 2010, at 5:29 PM, Rua Haszard Morris wrote:

 What I have tried:
 - new window NIB file
 - add a toolbar
 - add a custom view to the nib
 - add controls to the custom view - a button, textfield, etc, tweak layout to 
 taste
 - drag the custom view to the toolbar customise sheet (i.e. the allowed items 
 area)
 - it looks like the view content will appear - the buttons are drawn in the 
 allowed items area
 - drag the custom item to the toolbar (so it is in the default set) - oh no, 
 the buttons disappear
 - simulate the interface - oh no, still no buttons!
 
 Perhaps my first email was not concise enough...
 
 thanks for the help
 Rua HM.
 
 On 23/11/2010, at 1:55 PM, Graham Cox wrote:
 
 
 On 23/11/2010, at 10:02 AM, Rua Haszard Morris wrote:
 
 Is this not possible?
 
 
 Yes, it's possible. But your question is too open-ended. What have you 
 tried, what doesn't perform as expected?
 
 --Graham
 
 
 
 ___
 
 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/hagedorn%40apple.com
 
 This email sent to haged...@apple.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: how to add a custom view (a pair of controls) to an NSToolbar in Interface Builder

2010-11-29 Thread Rua Haszard Morris
Thank you Joey!

This most certainly works a treat.

cheers
Rua HM.

On 30/11/2010, at 10:59 AM, Joey Hagedorn wrote:

 Rua,
   This won't work with an instance of  the custom view in the toolbar. 
 A workaround would be to use a borderless (Custom / No Border) NSBox instead 
 of a custom view. This is probably the most straightforward fix.
 
 There is some more info in this older post to the list: 
 http://www.cocoabuilder.com/archive/cocoa/236455-nstoolbaritem-with-custom-view-in-interface-builder-3-leopard.html
 
 --Joey
 
 
 
 On Nov 22, 2010, at 5:29 PM, Rua Haszard Morris wrote:
 
 What I have tried:
 - new window NIB file
 - add a toolbar
 - add a custom view to the nib
 - add controls to the custom view - a button, textfield, etc, tweak layout 
 to taste
 - drag the custom view to the toolbar customise sheet (i.e. the allowed 
 items area)
 - it looks like the view content will appear - the buttons are drawn in the 
 allowed items area
 - drag the custom item to the toolbar (so it is in the default set) - oh no, 
 the buttons disappear
 - simulate the interface - oh no, still no buttons!
 
 Perhaps my first email was not concise enough...
 
 thanks for the help
 Rua HM.
 
 On 23/11/2010, at 1:55 PM, Graham Cox wrote:
 
 
 On 23/11/2010, at 10:02 AM, Rua Haszard Morris wrote:
 
 Is this not possible?
 
 
 Yes, it's possible. But your question is too open-ended. What have you 
 tried, what doesn't perform as expected?
 
 --Graham
 
 
 
 ___
 
 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/hagedorn%40apple.com
 
 This email sent to haged...@apple.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: how to add a custom view (a pair of controls) to an NSToolbar in Interface Builder

2010-11-22 Thread Rua Haszard Morris
Any suggestions on how to do this?

I simply want to use a bunch of controls, grouped via a custom view, in a 
toolbar, such that the controls form a single toolbar item (for add/remove), 
but the individual controls respond to mouse, draw, etc as normal.

Is this not possible?

thanks
Rua HM.

On 18/11/2010, at 12:44 PM, Rua Haszard Morris wrote:

 I would like to add an item to my window's toolbar that is a custom view 
 containing other standard views. For example a popup button and a static text 
 field. If possible I would like to do this in interface builder, without 
 implementing NSToolbarDelegate.
 
 So to clarify..
 
 I have a window with a toolbar in an interface builder file.
 I want to put a popup button and static text on the toolbar as a single item 
 - I want them to be removeable/addable as a pair, and I want full control 
 over their layout within the toolbar item.
 I want to run the interface in IB using the Cocoa Simulator and see the popup 
 button and text draw.
 
 1 - Is this possible in Interface Builder? If so, can someone briefly outline 
 the steps?
 
 2 - If this is not possible in IB, how would this best  be implemented? If 
 this is the case, can this work alongside configuring the toolbar in IB, or 
 will the allowed items configured in IB be ignored at runtime? (This is why 
 I'd prefer to do this fully in IB).
 
 What I have tried:
 - new window NIB file
 - add a toolbar
 - add a custom view to the nib
 - add controls to the custom view - a button, textfield, etc, tweak layout to 
 taste
 - drag the custom view to the toolbar customise sheet (i.e. the allowed items 
 area)
 - it looks like the view content will appear - the buttons are drawn in the 
 allowed items area
 - drag the custom item to the toolbar (so it is in the default set) - oh no, 
 the buttons disappear
 - simulate the interface - oh no, still no buttons!
 
 I didn't find any confirmation that this is not possible in these previous 
 threads..
 http://www.mail-archive.com/cocoa-dev@lists.apple.com/msg35450.html
 http://www.cocoabuilder.com/archive/cocoa/282463-custom-view-in-toolbar.html
 
 thanks for the help
 Rua HM.
 
 --
 http://cartoonbeats.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/r.haszard%40adinstruments.com
 
 This email sent to r.hasz...@adinstruments.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: how to add a custom view (a pair of controls) to an NSToolbar in Interface Builder

2010-11-22 Thread Graham Cox

On 23/11/2010, at 10:02 AM, Rua Haszard Morris wrote:

 Is this not possible?


Yes, it's possible. But your question is too open-ended. What have you tried, 
what doesn't perform as expected?

--Graham


___

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: how to add a custom view (a pair of controls) to an NSToolbar in Interface Builder

2010-11-22 Thread Rua Haszard Morris
What I have tried:
- new window NIB file
- add a toolbar
- add a custom view to the nib
- add controls to the custom view - a button, textfield, etc, tweak layout to 
taste
- drag the custom view to the toolbar customise sheet (i.e. the allowed items 
area)
- it looks like the view content will appear - the buttons are drawn in the 
allowed items area
- drag the custom item to the toolbar (so it is in the default set) - oh no, 
the buttons disappear
- simulate the interface - oh no, still no buttons!

Perhaps my first email was not concise enough...

thanks for the help
Rua HM.

On 23/11/2010, at 1:55 PM, Graham Cox wrote:

 
 On 23/11/2010, at 10:02 AM, Rua Haszard Morris wrote:
 
 Is this not possible?
 
 
 Yes, it's possible. But your question is too open-ended. What have you tried, 
 what doesn't perform as expected?
 
 --Graham
 
 

___

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


how to add a custom view (a pair of controls) to an NSToolbar in Interface Builder

2010-11-21 Thread Rua Haszard Morris
I would like to add an item to my window's toolbar that is a custom view 
containing other standard views. For example a popup button and a static text 
field. If possible I would like to do this in interface builder, without 
implementing NSToolbarDelegate.

So to clarify..

I have a window with a toolbar in an interface builder file.
I want to put a popup button and static text on the toolbar as a single item - 
I want them to be removeable/addable as a pair, and I want full control over 
their layout within the toolbar item.
I want to run the interface in IB using the Cocoa Simulator and see the popup 
button and text draw.

1 - Is this possible in Interface Builder? If so, can someone briefly outline 
the steps?

2 - If this is not possible in IB, how would this best  be implemented? If this 
is the case, can this work alongside configuring the toolbar in IB, or will the 
allowed items configured in IB be ignored at runtime? (This is why I'd prefer 
to do this fully in IB).

What I have tried:
- new window NIB file
- add a toolbar
- add a custom view to the nib
- add controls to the custom view - a button, textfield, etc, tweak layout to 
taste
- drag the custom view to the toolbar customise sheet (i.e. the allowed items 
area)
- it looks like the view content will appear - the buttons are drawn in the 
allowed items area
- drag the custom item to the toolbar (so it is in the default set) - oh no, 
the buttons disappear
- simulate the interface - oh no, still no buttons!

I didn't find any confirmation that this is not possible in these previous 
threads..
http://www.mail-archive.com/cocoa-dev@lists.apple.com/msg35450.html
http://www.cocoabuilder.com/archive/cocoa/282463-custom-view-in-toolbar.html

thanks for the help
Rua HM.

--
http://cartoonbeats.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