Re: NSSegmentedControl & NSSegmentStyleSeparated & autolayout

2015-08-27 Thread Arjan van Leeuwen
6, 2015 at 3:31 PM, Ken Thomases > wrote: > >> On Aug 26, 2015, at 7:04 AM, Jacek Oleksy wrote: > >> > >>> I want to set NSSegmentStyleSeparated on my NSSegmentedControl > >>> (managed by autolayout). However, when I create constraints for the

Re: NSSegmentedControl & NSSegmentStyleSeparated & autolayout

2015-08-27 Thread Jacek Oleksy
ple. > > Thaddeus O. Cooper > (tcoo...@nomoreboxes.com) > > > >> On Aug 26, 2015, at 6:38 AM, Jacek Oleksy wrote: >> >> Nope, I am still getting the exception. >> >> J. >> >> On Wed, Aug 26, 2015 at 3:31 PM, Ken Thomases wrote: >>>

Re: NSSegmentedControl & NSSegmentStyleSeparated & autolayout

2015-08-26 Thread Thaddeus Cooper
gt; > On Wed, Aug 26, 2015 at 3:31 PM, Ken Thomases wrote: >> On Aug 26, 2015, at 7:04 AM, Jacek Oleksy wrote: >> >>> I want to set NSSegmentStyleSeparated on my NSSegmentedControl >>> (managed by autolayout). However, when I create constraints for the >

Re: NSSegmentedControl & NSSegmentStyleSeparated & autolayout

2015-08-26 Thread Jacek Oleksy
Nope, I am still getting the exception. J. On Wed, Aug 26, 2015 at 3:31 PM, Ken Thomases wrote: > On Aug 26, 2015, at 7:04 AM, Jacek Oleksy wrote: > >> I want to set NSSegmentStyleSeparated on my NSSegmentedControl >> (managed by autolayout). However, when I create c

Re: NSSegmentedControl & NSSegmentStyleSeparated & autolayout

2015-08-26 Thread Ken Thomases
On Aug 26, 2015, at 7:04 AM, Jacek Oleksy wrote: > I want to set NSSegmentStyleSeparated on my NSSegmentedControl > (managed by autolayout). However, when I create constraints for the > parent view, I get an exception: > > Assertion failure in -[NSSegmentedControl ns_widgetType],

NSSegmentedControl & NSSegmentStyleSeparated & autolayout

2015-08-26 Thread Jacek Oleksy
Hi All, I want to set NSSegmentStyleSeparated on my NSSegmentedControl (managed by autolayout). However, when I create constraints for the parent view, I get an exception: Assertion failure in -[NSSegmentedControl ns_widgetType], /SourceCache/AppKit/AppKit-1348.17/Layout.subproj

Re: Binding NSSegmentedControl selection to user defaults

2012-08-29 Thread Keary Suska
roject, in a .xib file, I >>> experience several problems, and finally a crash on loading the .xib file. >>> >>> 1. In Interface builder, only one of the binding options appears for >>> NSSegmentedControl (Raises for Not Applicable Keys) all the rest a

Re: Binding NSSegmentedControl selection to user defaults

2012-08-29 Thread Motti Shneor
t; experience several problems, and finally a crash on loading the .xib file. >> >> 1. In Interface builder, only one of the binding options appears for >> NSSegmentedControl (Raises for Not Applicable Keys) all the rest are simply >> not there. >&

Re: Binding NSSegmentedControl selection to user defaults

2012-08-28 Thread Keary Suska
tions appears for > NSSegmentedControl (Raises for Not Applicable Keys) all the rest are simply > not there. > > 2. I have bound my NSSegmentedControl's "selectedIndex" to the "Shared User > Defaults Controller.values.mySegmentedControlSelection" key, but the >

Binding NSSegmentedControl selection to user defaults

2012-08-28 Thread Motti Shneor
Hello everyone. I'm trying to do something simple --- to have an NSSegmentedControl (2 segments) save and restore its selection (the "pressed" segments) from the user-defaults. Documentation seems to be quite clear: Cocoa Bindings Reference: NSSegmentedC

Re: NSSegmentedControl in ToolBar [ANSWER]

2012-08-13 Thread koko
So it must be that the KVO of a tool bar item to its underlying control is out of whack. Select the toolbar item and adjust its width. -koko On Aug 13, 2012, at 12:41 PM, koko wrote: > Add a Toolbar to a window in IB > > Add a Segmented Control as a Toolbar Item > > The default Lab

NSSegmentedControl in ToolBar

2012-08-13 Thread koko
Add a Toolbar to a window in IB Add a Segmented Control as a Toolbar Item The default Label is 'Custom View' The control has 3 segments The label is centered under segment 1 Change the number of segment to 2 The label is centered on the center of the control Run

[RESOLVED] NSSegmentedControl

2011-08-03 Thread koko
So I set the images for seg 0 and seg 3 to those for seg 1 and seg 2 which were displaying All segs now display an image So, I made all images the same size as those that displayed. I noticed that one image that did not display has a resolution of 88.xxx pixels/inch the others were 72.01 so

Re: NSSegmentedControl

2011-08-03 Thread Jens Alfke
On Aug 3, 2011, at 12:30 PM, koko wrote: > The path type for the images for segments 0 and 3 and segments 1 and 2 is > "Relative to Enclosing Group". No, I mean the image names as specified in the control in Interface Builder. —Jens smime.p7s Description: S/MIME cryptographic signature __

Re: NSSegmentedControl

2011-08-03 Thread koko
t 11:51 AM, koko wrote: > >> I have a NSSegmentedControl as an item in a toolbar. There are 4 segments >> each with a different image. >> When I build, create an installer package and install on my system the >> control draws as expected. >> Using the same installe

Re: NSSegmentedControl

2011-08-03 Thread Jens Alfke
On Aug 3, 2011, at 11:51 AM, koko wrote: > I have a NSSegmentedControl as an item in a toolbar. There are 4 segments > each with a different image. > When I build, create an installer package and install on my system the > control draws as expected. > Using the same install

NSSegmentedControl

2011-08-03 Thread koko
I have a NSSegmentedControl as an item in a toolbar. There are 4 segments each with a different image. When I build, create an installer package and install on my system the control draws as expected. Using the same installer package on a remote system the control does not draw the image for

Re: Autosizing mask doesn't work with NSSegmentedControl

2011-07-12 Thread Jens Alfke
On Jul 12, 2011, at 2:16 AM, Filip van der Meeren wrote: > I have set up an NSSegmentedControl in IB with the autosizingmasks but the > control won't stretch or shrink as it should. Any clue about why? I have > searched the google pages and the apple doc but came up empty. NSSe

Re: Autosizing mask doesn't work with NSSegmentedControl

2011-07-12 Thread Fritz Anderson
On 12 Jul 2011, at 4:16 AM, Filip van der Meeren wrote: > I have set up an NSSegmentedControl in IB with the autosizingmasks but the > control won't stretch or shrink as it should. Any clue about why? I have > searched the google pages and the apple doc but came up empty. Ex

Autosizing mask doesn't work with NSSegmentedControl

2011-07-12 Thread Filip van der Meeren
Hi everyone, I have set up an NSSegmentedControl in IB with the autosizingmasks but the control won't stretch or shrink as it should. Any clue about why? I have searched the google pages and the apple doc but came up empty. Thanks, Filip__

Re: NSSegmentedControl Label

2011-01-16 Thread Matt Neuburg
On Fri, 14 Jan 2011 18:57:00 -0700, koko said: >Ouch! > >Some of us need to lighten up Some of us need to ask questions properly. You explicitly said, "Is there a recommended manner to accomplish this?". I told you where to find the recommended use of NSSegmentedControl. T

Re: NSSegmentedControl Label

2011-01-15 Thread jonat...@mugginsoft.com
On 14 Jan 2011, at 23:35, Kyle Sluder wrote: > On Fri, Jan 14, 2011 at 1:17 PM, Shawn Bakhtiar > wrote: >> Don't listen to the naysayers... You can do whatever you want. > > Sure, but koko asked how he could tell an NSSegmentedCell to draw its > image and its text. It's apparent that the autho

Re: NSSegmentedControl Label

2011-01-14 Thread koko
; -koko >> >> On Jan 14, 2011, at 1:33 PM, Conrad Shultz wrote: >> >>> -BEGIN PGP SIGNED MESSAGE- >>> Hash: SHA1 >>> >>> On 1/14/11 12:28 PM, koko wrote: >>>> Thanks Matt but the documentation is no help whatsoever. I read it

Re: NSSegmentedControl Label

2011-01-14 Thread Conrad Shultz
GNED MESSAGE- >> Hash: SHA1 >> >> On 1/14/11 12:28 PM, koko wrote: >>> Thanks Matt but the documentation is no help whatsoever. I read it. >>> >>> The question remains ... What is the recommended manner to put text >>> and graph

Re: NSSegmentedControl Label

2011-01-14 Thread Sherm Pendley
On Fri, Jan 14, 2011 at 6:35 PM, Kyle Sluder wrote: > > Images-and-text on segmented cells can look atrocious. It can look > like Windows. It can look like someone feels like disrespecting > platform conventions. But sometimes violating the HIG is precisely the > right thing to do. That's why they

Re: NSSegmentedControl Label

2011-01-14 Thread Kyle Sluder
On Fri, Jan 14, 2011 at 1:17 PM, Shawn Bakhtiar wrote: > Don't listen to the naysayers... You can do whatever you want. Sure, but koko asked how he could tell an NSSegmentedCell to draw its image and its text. It's apparent that the authors of NSSegmentedCell did not implement this, because why i

Re: NSSegmentedControl Label

2011-01-14 Thread Laurent Daudelin
such thing. Nothing could be father from the truth, you can always >> added any missing functionality, or override any ones you don't like. >> >> IMHO >> >> >> >>> Date: Fri, 14 Jan 2011 12:44:19 -0800 >>> From: kyle.slu...@gmail.com &

Re: NSSegmentedControl Label

2011-01-14 Thread koko
12:44:19 -0800 > > From: kyle.slu...@gmail.com > > To: k...@highrolls.net > > CC: cocoa-dev@lists.apple.com > > Subject: Re: NSSegmentedControl Label > > > > On Fri, Jan 14, 2011 at 12:38 PM, koko wrote: > > > It may not be recommended but I want to do

Re: mouseDown in NSSegmentedControl

2011-01-14 Thread aglee
Did you override mouseDown or mouseDown:? --Andy On Jan 14, 2011, at 03:08 PM, koko wrote: I have sub-classed NSSegmentedControl and set this class to the NSSegmentedControl in IB. I have implemented mouseDown in the sub-class thinking I would get these events. I do not. How does one get

RE: NSSegmentedControl Label

2011-01-14 Thread Shawn Bakhtiar
n't like. IMHO > Date: Fri, 14 Jan 2011 12:44:19 -0800 > From: kyle.slu...@gmail.com > To: k...@highrolls.net > CC: cocoa-dev@lists.apple.com > Subject: Re: NSSegmentedControl Label > > On Fri, Jan 14, 2011 at 12:38 PM, koko wrote: > > It may not be recommende

Re: NSSegmentedControl Label

2011-01-14 Thread Kyle Sluder
On Fri, Jan 14, 2011 at 12:38 PM, koko wrote: > It may not be recommended but I want to do it.  Should I get permission from > from steven p jobs first? > > Apple HIG is not the be-all, end-all of UI design. No, but it is the design document by which the AppKit implementors write their code. If

Re: NSSegmentedControl Label

2011-01-14 Thread koko
:28 PM, koko wrote: >> Thanks Matt but the documentation is no help whatsoever. I read it. >> >> The question remains ... What is the recommended manner to put text >> and graphic in one segment of an NSSegmentedControl. > > It's not recommended. > > - From

Re: NSSegmentedControl Label

2011-01-14 Thread jonat...@mugginsoft.com
On 14 Jan 2011, at 20:28, koko wrote: > Thanks Matt but the documentation is no help whatsoever. I read it. > > The question remains ... What is the recommended manner to put text and > graphic in one segment of an NSSegmentedControl. > > > Try the docs for NSSe

Re: NSSegmentedControl Label

2011-01-14 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 1/14/11 12:28 PM, koko wrote: > Thanks Matt but the documentation is no help whatsoever. I read it. > > The question remains ... What is the recommended manner to put text > and graphic in one segment of an NSSegmentedContro

Re: NSSegmentedControl Label

2011-01-14 Thread koko
Thanks Matt but the documentation is no help whatsoever. I read it. The question remains ... What is the recommended manner to put text and graphic in one segment of an NSSegmentedControl. -koko On Jan 14, 2011, at 1:09 PM, Matt Neuburg wrote: > On Fri, 14 Jan 2011 11:01:15 -0700, k

Re: NSSegmentedControl Label

2011-01-14 Thread Matt Neuburg
On Fri, 14 Jan 2011 11:01:15 -0700, koko said: >I would like to programmatically set the label for a section of an >NSSegmentedControl which would contain text and a graphic. Is there a >recommended manner to accomplish this? The usual way to discover the recommended manner is to

mouseDown in NSSegmentedControl

2011-01-14 Thread koko
I have sub-classed NSSegmentedControl and set this class to the NSSegmentedControl in IB. I have implemented mouseDown in the sub-class thinking I would get these events. I do not. How does one get mouseDown in an NSSegmentedControl? -koko

NSSegmentedControl Label

2011-01-14 Thread koko
I would like to programmatically set the label for a section of an NSSegmentedControl which would contain text and a graphic. Is there a recommended manner to accomplish this? -koko ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Re: NSSegmentedControl in select any mode not working with textured appearance?

2010-12-10 Thread Peter Ammon
On Dec 9, 2010, at 8:45 AM, Jesper Papmehl-Dufay wrote: > Hi! > > I'm having a bit of trouble with the segmented control. > I'm trying to use it as a group of check buttons (I set the Mode to Select > Any in Interface Builder). > This works fine as long as I don't set the Style to Textured Roun

NSSegmentedControl in select any mode not working with textured appearance?

2010-12-09 Thread Jesper Papmehl-Dufay
Hi! I'm having a bit of trouble with the segmented control. I'm trying to use it as a group of check buttons (I set the Mode to Select Any in Interface Builder). This works fine as long as I don't set the Style to Textured Rounded or Textured Square in IB. If I do, the control stops drawing the

Re: Set NSSegmentedControl ToolTip

2010-09-27 Thread koko
the view for a segment? Yes, see -[NSSegmentedCell setToolTip:forSegment:]. The contained NSSegmentedCell has a more comprehensive API than NSSegmentedControl. -Peter ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

Re: Set NSSegmentedControl ToolTip

2010-09-27 Thread Peter Ammon
-[NSSegmentedCell setToolTip:forSegment:]. The contained NSSegmentedCell has a more comprehensive API than NSSegmentedControl. -Peter___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact

Set NSSegmentedControl ToolTip

2010-09-27 Thread koko
Is it possible to set a tool tip for a segment of a segmented control programatically? That is what would be the receiver of -setToolTip? Or, how does one get the view for a segment? -koko ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Ple

Re: NSSegmentedControl in a toolbar [SOLVED]

2010-05-05 Thread Flavio Donadio
ple think it is a NSSegmentedControl. Is there a way >> to know this for sure? I mean, you seem to really know it, but how did you >> do? >> > > the way to tell is to look in the preview.app package and see that there are > parts of the butt

Re: NSSegmentedControl in a toolbar

2010-05-05 Thread Brian Postow
ontrol >> in Mail (Reply -- Reply All -- Forward) isn't one. > > I am sure a lot of people think it is a NSSegmentedControl. Is there a way to > know this for sure? I mean, you seem to really know it, but how did you do? > the way to tell is to look in the preview

Re: NSSegmentedControl in a toolbar

2010-05-05 Thread Flavio Donadio
what you want *isn't* a segmented > control. Segment controls have their segment labels inside the segments, not > below them, which is why (for example) what looks like a segmented control in > Mail (Reply -- Reply All -- Forward) isn't one. I am sure a lot of people think it is

Re: NSSegmentedControl in a toolbar

2010-05-05 Thread Brian Postow
I should mention that what I did is that I used a segmented control, and then used the single under the control label, but used spaces and centering to make it LOOK like it had two labels, even though it really only has one label... so instead of having "next" under one arrow and "prev" under t

Re: NSSegmentedControl in a toolbar

2010-05-05 Thread Quincey Morris
On May 5, 2010, at 07:00, Flavio Donadio wrote: > Yes, I could do it in IB, if only I knew how to put the labels below each > segment, which is my ultimate goal here. And that points to your real problem -- what you want *isn't* a segmented control. Segment controls have their segment labels in

Re: NSSegmentedControl in a toolbar

2010-05-05 Thread Brian Postow
I've tried doing this myself. I don't think it can be done. at least not the way we want to do it. If you look in the Preview.app package, you can find all of the images that it uses in the contents/resources folder. Notice that it has buttonLeft.tiff, ButtonLeftAquar.tif, buttonLeftDark.tif,

Re: NSSegmentedControl in a toolbar

2010-05-05 Thread Flavio Donadio
labels below each segment, which is my ultimate goal here. The best I can do in IB is to set the label for the whole NSSegmentedControl -- with spaces, like "Reply Reply All Forward" -- and adjust the widths so it aligns correctly. It doesn't look bad, but doesn't seem ri

Re: NSSegmentedControl in a toolbar

2010-05-04 Thread Jerry Krinock
On 2010 May 04, at 18:42, Flavio Donadio wrote: > Ok, I can create the NSSegmentedControl in code, but I got to have an NSView > to load it into, anyways. I have an NSSearchField in a toolbar. It is a subview of an NSToolbarItem, not of an NSView. And again, unless you need to be p

Re: NSSegmentedControl in a toolbar

2010-05-04 Thread Flavio Donadio
Graham, Thanks for the answer, but I think you didn't get what I want to do. Or I didn't make myself clear enough. > Either create the control in code or create it in IB. Don't do both. Ok, I can create the NSSegmentedControl in code, but I got to have an NSView to loa

Re: NSSegmentedControl in a toolbar

2010-05-04 Thread Seth Willits
On May 4, 2010, at 5:46 PM, Graham Cox wrote: > I haven't found a need to use toolbar groups myself (though presumably they > solve a problem I haven't needed to solve so far) AFAICT, multiple labels on a single toolbar item? -- Seth Willits ___

Re: NSSegmentedControl in a toolbar

2010-05-04 Thread Graham Cox
On 05/05/2010, at 9:54 AM, Flavio Donadio wrote: > Finally, in Interface Builder, I inserted an NSSegmentedControl in my toolbar > and bound it to the outlet in the App Delegate instance in the NIB. > > It doesn't work. My segmented control doesn't get the images or l

NSSegmentedControl in a toolbar

2010-05-04 Thread Flavio Donadio
Fellows, I tried to search the list for a solution to this problem, but maybe I'm not a good searcher. I am trying to use a NSSegmentedControl in a toolbar, capsule-styled, just like in Mail or Preview. I mean: I want each segment to have its own label, like in the "Reply /

Bypassing action method in NSSegmentedControl

2010-03-07 Thread Ulai Beekam
I have an NSSegmentedControl with 2 segments. The first has a menu set. The second has no menu. I have set a target and action for the whole segmented control. My problem is that I have to hold down the first segment to see the menu for it. By just clicking on it, the action method gets

Re: NSSegmentedControl

2010-03-04 Thread Eli Bach
On Mar 4, 2010, at 8:40 PM, David Blanton wrote: > Is it possible to change the height of an NSSegmentedControl? > > IB gives access the the width of segments but not height. > > If subclass what would the method be to change the height? > > -db Could it just be that i

NSSegmentedControl

2010-03-04 Thread David Blanton
Is it possible to change the height of an NSSegmentedControl? IB gives access the the width of segments but not height. If subclass what would the method be to change the height? -db ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Re: NSSegmentedControl select multiple cells

2010-03-04 Thread Hado Hein
Florian Soenens wrote: > how to select multiple. In IB there is an 'selection' option in the attributes inspector for the behaviour. Set it from momentary to multiple. Afterwards you have to handle that in your code like: if ( [control isSelectedForSegment:3] ) and the like. -- Hado Hein

Re: NSSegmentedControl select multiple cells

2010-03-04 Thread jonat...@mugginsoft.com
On 4 Mar 2010, at 10:50, Florian Soenens wrote: > Hi Jonathan, > > i just discovered the same thing, my control is Textured Rounded and doesn't > work, Regular Rounded seems to work fine. > Should i file a bug? > Hard to know if this is a bug or just a variant behaviour by design. Have you che

Re: NSSegmentedControl select multiple cells

2010-03-04 Thread Florian Soenens
Hi Jonathan, i just discovered the same thing, my control is Textured Rounded and doesn't work, Regular Rounded seems to work fine. Should i file a bug? On 04 Mar 2010, at 11:47, jonat...@mugginsoft.com wrote: > A 10 sec 10.6 demo project - 1 window + 1 NSSegmentedControl - shows

Re: NSSegmentedControl select multiple cells

2010-03-04 Thread jonat...@mugginsoft.com
A 10 sec 10.6 demo project - 1 window + 1 NSSegmentedControl - shows this is possible. However, behaviour seems to vary depending on the style of the control. The textured rounded style seems to like to do its own thing. Other styles are more well behaved. Regards Jonathan Mitchell Developer

Re: NSSegmentedControl select multiple cells

2010-03-04 Thread Florian Soenens
No bindings, not even the enabled binding. I was even wondering if it is uberhaupt possible to select multiple cells in a NSSegmentedControl? On 04 Mar 2010, at 10:43, jonat...@mugginsoft.com wrote: > > On 4 Mar 2010, at 09:28, Florian Soenens wrote: > >> Hi List, >>

Re: NSSegmentedControl select multiple cells

2010-03-04 Thread jonat...@mugginsoft.com
On 4 Mar 2010, at 09:28, Florian Soenens wrote: > Hi List, > > i googled this but found nothing relevant. > I want a segmented control with 6 cells that instead of acting like radio > buttons, they should act as checkboxes, that is, multiple cells should be > selected. > I tried to set the mod

NSSegmentedControl select multiple cells

2010-03-04 Thread Florian Soenens
Hi List, i googled this but found nothing relevant. I want a segmented control with 6 cells that instead of acting like radio buttons, they should act as checkboxes, that is, multiple cells should be selected. I tried to set the mode to "select any" in IB but no no avail. Also tried setting the

Re: Trouble with NSSegmentedControl

2009-11-16 Thread Dave DeLong
Thanks to Seth and his subclass of NSSegmentedControl, I have this working exactly as I had hoped! Cheers, Dave On Nov 16, 2009, at 7:44 PM, Seth Willits wrote: > > On Nov 16, 2009, at 2:09 PM, Dave DeLong wrote: > >> How can I achieve the behavior that I'm looking for

Re: Trouble with NSSegmentedControl

2009-11-16 Thread Seth Willits
On Nov 16, 2009, at 2:09 PM, Dave DeLong wrote: How can I achieve the behavior that I'm looking for (and that is implied in the documentation)? NSSegmentedControl, like NSSplitView, leaves *much* to be desired. Over time, my solution has evolved into an NSSegmentedControl subclass

Trouble with NSSegmentedControl

2009-11-16 Thread Dave DeLong
Hi everyone, I'm having an issue with NSSegmentedControl. My control has two segments. Segment 0 has an image of NSAddTemplate, and segment 1 has an image of NSRemoveTemplate. Segment 0 is always enabled, and segment 1 is conditionally enabled. Segment 0 has a menu, segment 1 doe

Re: NSSegmentedControl with square edges

2009-09-11 Thread Stephen Blinkhorn
e the time, inclination and need to make a custom control then it can be quite rewarding. I have made custom subclasses of NSSegmentedControl recently myself. Which style do you want to recreate for Tiger? Small Square? That one could be quite straight forward.

Re: NSSegmentedControl with square edges

2009-09-11 Thread Peter Ammon
On Sep 11, 2009, at 8:10 AM, Arun wrote: Hi All, Does anybody know how to create an NSSegmentedControl with squared edges ? If anyone has sample code please share.. I know if i use leopard SDK, by just changing a style in the IB we can achieve this. But since my app needs to support on

NSSegmentedControl with square edges

2009-09-11 Thread Arun
Hi All, Does anybody know how to create an NSSegmentedControl with squared edges ? If anyone has sample code please share.. I know if i use leopard SDK, by just changing a style in the IB we can achieve this. But since my app needs to support on tiger, i need this. Thanks Arun KA

Setting the width of a segment to 0 in NSSegmentedControl doesn't work so well

2009-08-05 Thread Peter Zegelin
My application has a dynamic segmented control, where the user can specify that each segment has an icon, text, or both. However I am having trouble correctly resizing a segment. According to the docs, calling - (void)setWidth:(CGFloat)width forSegment:(NSInteger)segment with 0 for the widt

Re: Validating a NSSegmentedControl in a toolbar

2009-06-04 Thread Graham Cox
On 05/06/2009, at 12:26 PM, Graham Cox wrote: Follow-up question: how can I turn OFF a segment in a segmented control? The situation is this: Iterating over the segments with -setSelected:NO forSegment: does the trick for this. --Graham ___

Re: Validating a NSSegmentedControl in a toolbar

2009-06-04 Thread Graham Cox
On 05/06/2009, at 11:29 AM, Joar Wingfors wrote: On 4 jun 2009, at 18.10, Graham Cox wrote: There's a note in the documentation for -validateToolbarItem: that "NSToolbar only calls this method for image items", which might explain it. So what do I need to do to make this work for the se

Re: Validating a NSSegmentedControl in a toolbar

2009-06-04 Thread Nick Zitzmann
On Jun 4, 2009, at 7:10 PM, Graham Cox wrote: There's a note in the documentation for -validateToolbarItem: that "NSToolbar only calls this method for image items", which might explain it. So what do I need to do to make this work for the segmented control? In addition to what Joar sugg

Re: Validating a NSSegmentedControl in a toolbar

2009-06-04 Thread Joar Wingfors
On 4 jun 2009, at 18.10, Graham Cox wrote: There's a note in the documentation for -validateToolbarItem: that "NSToolbar only calls this method for image items", which might explain it. So what do I need to do to make this work for the segmented control? I've read all the toolbar and valid

Validating a NSSegmentedControl in a toolbar

2009-06-04 Thread Graham Cox
I'm having problems validating an NSSegmentedControl in a toolbar. I have tried implementing both -validateUserInterfaceItem: and - validateToolbarItem: but neither is called for the segmented control. They are called for other simple buttons in the toolbar. There's a n

Re: Removing delay for a menu in NSSegmentedControl?

2009-05-25 Thread slasktrattena...@gmail.com
I had the same problem and ended up displaying the menu programmatically in my control's action method. I hope someone can provide a better solution... NSPoint point = [segmentedControl convertPoint:[segmentedControl frame].origin fromView:nil]; NSEvent *event = [NSEvent mouseEventWithType:NSLeftM

Re: Removing delay for a menu in NSSegmentedControl?

2009-05-25 Thread Mark Munz
There is an IBAction attached to the segment control that processes the other segment clicks and does nothing for the menu segment. If I completely disconnect the IBAction, the menu pops up instantly. However, if I connect it to an IBAction (even to an empty routine), the delay returns. The delay

Re: Removing delay for a menu in NSSegmentedControl?

2009-05-25 Thread Dave Keck
> Right now, there is about about a 1-second delay after a click on a > segment before its menu will appear. > > Is there a way to remove this delay in bringing up a menu attached to a > segment? This isn't typical - if you create a new project and just drop a NSSC in a window, you'll see there's

Removing delay for a menu in NSSegmentedControl?

2009-05-25 Thread Mark Munz
Right now, there is about about a 1-second delay after a click on a segment before its menu will appear. Is there a way to remove this delay in bringing up a menu attached to a segment? Thanks. -- Mark Munz unmarked software http://www.unmarked.com/ ___

Re: Obvious NSSegmentedControl Bug?

2009-04-13 Thread Seth Willits
report. sc is a 3-segment NSSegmentedControl with either Select One or Select Any as its mode. Segment 1 (the middle one) is selected in IB. Triggered as an action: NSLog(@"Before:"); NSLog(@" %d", [sc selectedSegment]); NSLog(@" %@", [sc isSelectedForSegme

Re: Obvious NSSegmentedControl Bug?

2009-04-13 Thread Peter Ammon
This looks like a bug. I appreciate your taking the time to check and hopefully to file it. -Peter On Apr 12, 2009, at 1:22 PM, Seth Willits wrote: I need a sanity check before I file a bug report. sc is a 3-segment NSSegmentedControl with either Select One or Select Any as its mode

Obvious NSSegmentedControl Bug?

2009-04-12 Thread Seth Willits
I need a sanity check before I file a bug report. sc is a 3-segment NSSegmentedControl with either Select One or Select Any as its mode. Segment 1 (the middle one) is selected in IB. Triggered as an action: NSLog(@"Before:"); NSLog(@" %d", [sc selectedSegment])

Re: NSSegmentedControl send action only from the selected segment

2009-03-24 Thread Keary Suska
On Mar 24, 2009, at 3:54 AM, Michele Barboni wrote: On Mar 19, 2009, at 10:11 AM, Michele Barboni wrote: Hi, I've a NSSegmentedControl, 7 segments (labeled with weekdays), which has selectedIndex bound through a value transformer (NO reverse transformation) to NSDates. Now, one

Re: NSSegmentedControl send action only from the selected segment

2009-03-24 Thread Michele Barboni
On Mar 19, 2009, at 10:11 AM, Michele Barboni wrote: Hi, I've a NSSegmentedControl, 7 segments (labeled with weekdays), which has selectedIndex bound through a value transformer (NO reverse transformation) to NSDates. Now, one of my awakeFromNib do this: [sedutaDays setTarget

NSSegmentedControl send action only from the selected segment

2009-03-19 Thread Michele Barboni
Hi, I've a NSSegmentedControl, 7 segments (labeled with weekdays), which has selectedIndex bound through a value transformer (NO reverse transformation) to NSDates. Now, one of my awakeFromNib do this: [sedutaDays setTarget:self]; [sedutaDays setAction:@selector(setWeekDay:)]; [sedut

Re: Is it possible to make the height of an NSSegmentedControl taller?

2009-03-11 Thread Paul Sanders
> If you _really_ need a taller one, you could create your own > custom > control. It wouldn't be too hard, but I recommend making your > images > smaller to fit the stock control. Or perhaps use a tab metaphor (which you would have to code yourself, of course). Maybe this is against the Human

Re: Is it possible to make the height of an NSSegmentedControl taller?

2009-03-11 Thread Dave Keck
On Tue, Mar 10, 2009 at 10:04 PM, Stuart Malin wrote: > I am using an NSSegmentedControl in a toolbar to hold some mutually > exclusive selections. I invoke -setImage:forSegment: to set an image for > each, but the images are taller than the height of the segments. I don't >

Is it possible to make the height of an NSSegmentedControl taller?

2009-03-11 Thread Stuart Malin
I am using an NSSegmentedControl in a toolbar to hold some mutually exclusive selections. I invoke -setImage:forSegment: to set an image for each, but the images are taller than the height of the segments. I don't seem to have any control over that height with the NSRect I use to ini

Modify appearance of NSSegmentedControl

2008-12-28 Thread Gerriet M. Denkmann
I have an NSSegmentedControl with segmentCount = 1, segmentStyle = NSSegmentStyleSmallSquare (used in a Toolbar). When the NSSegmentedControl has state = NSOnState, the backgroung is light gray with black text. I want to have a dark gray background with white text. (Same as a Round

Re: NSSegmentedControl segment bindings

2008-06-24 Thread Ron Lue-Sang
you're trying to do. - RONZILLA On Jun 24, 2008, at 6:42 AM, Hamish Allan <[EMAIL PROTECTED]> wrote: Hi, As far as I can tell, the enabled state of specific segments of an NSSegmentedControl (which you can set / get through setEnabled:forSegment: / -isEnabledForSegment:) are not ac

NSSegmentedControl segment bindings

2008-06-24 Thread Hamish Allan
Hi, As far as I can tell, the enabled state of specific segments of an NSSegmentedControl (which you can set / get through setEnabled:forSegment: / -isEnabledForSegment:) are not accessible through bindings. This surprises me, so I thought I'd ask here in case I'm missing somethin

NSSegmentedControl selection mode

2008-05-06 Thread Andrew Kimpton
I have an NSSegmentedControl which I'm trying to make work just like the one in iCal. I have two central segments (Week & Month - no days) and a segment at each end for forward/back. If the control is in 'select one' mode I can have either week or month selected and dr

Re: Continunous NSSegmentedControl?

2008-04-08 Thread slasktrattenator
. It's not pretty, but gets the job done. On Tue, Apr 8, 2008 at 1:31 AM, Randall Meadows <[EMAIL PROTECTED]> wrote: > I have an NSSegmentedControl on which I've enabled the "continuous" setting > (via IB). However, it doesn't send out continuous messages while

Continunous NSSegmentedControl?

2008-04-07 Thread Randall Meadows
I have an NSSegmentedControl on which I've enabled the "continuous" setting (via IB). However, it doesn't send out continuous messages while I'm continually pressing one of the segments; it only fires (once) upon mouseUp. I can find no documentation that say

NSSegmentedControl highlights

2008-02-21 Thread Greg Hoover
There are already a number of issues with segmented controls in toolbars, but I didn't find a solution to this one: When the window is not in focus, the segmented control in the toolbar looses all highlight (lo-light) behavior. The control should color the selected segment with a lo-light