Skip navigation.
 
mlRe: programatically show NSSegmentedCell menu?
FROM : Jesse Grosjean
DATE : Thu Mar 27 21:40:42 2008

Bob,

Thanks, but that only seems to select the cell. I want to temporarily 
highlight the cell, and show the menu, as if the user has clicked on 
it. Anyway looking into synthesizing the mouse event now.

Jesse

On Mar 27, 2008, at 4:32 PM, Bob Clark wrote:
> On Mar 27, 2008, at 1:21 PM, Jesse Grosjean wrote:

>> I'm trying to programatically show a NSSgetmentedCell menu, as if 
>> the user has clicked on that segmented cell. For normal popup 
>> buttons you can do this with 'performClick:', but that doesn't work 
>> for segmented controls, because it will always just perform the 
>> click on the middle cell. Is there a way to do a "targeted" 
>> performClick on a NSSegmentedControl? That's targeted to a specific 
>> cell?

>
> Hi Jesse.
>
> Use setSelectedSegment instead.
>
>    NSSegmentedControl* seg;
>    ...
>    [seg setSelectedSegment:4];
>
>
> --
> Bob Clark
> Lead Software Development Engineer
> RealPlayer Mac/Unix
> RealNetworks, Inc.
>
>

Related mailsAuthorDate
mlprogramatically show NSSegmentedCell menu? Jesse Grosjean Mar 27, 21:21
mlRe: programatically show NSSegmentedCell menu? Bob Clark Mar 27, 21:32
mlRe: programatically show NSSegmentedCell menu? Jesse Grosjean Mar 27, 21:40