• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Setting RadioButton programatically
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting RadioButton programatically


  • Subject: Re: Setting RadioButton programatically
  • From: Fritz Anderson <email@hidden>
  • Date: Sat, 23 Nov 2002 14:31:15 -0600

Do you mean you want to select one radio button in an NSMatrix of them? If the buttons are arranged vertically, do this:

int selection;
[radioMatrix selectCellAtRow: selection column: 0];

To get the selected button do this:

selection = [radioMatrix selectedRow];

The NSMatrix ensures the proper radio-button behavior of only one selection at all times.

The tag value of the cells is there for your reference only, and does not affect the appearance or behavior of the cells.

-- F


On Friday, November 22, 2002, at 07:10 AM, Uwe Schlosser wrote:

I would like to set a RadioButton (5 button in a row) programatically.

I tried a way similar to a IBAction methode

-(void)boxAuswahlIntern:(int)value
{
id theCell = [myRadioButton selectedCell]; //myRadioButton is
IBOutlet and right connected IB
[theCell setTag:value];
}

but this does not work!

--
Fritz Anderson - Consulting Programmer - Chicago, IL
Mail: <email@hidden>
Risumi: <http://resume.manoverboard.org>
_______________________________________________
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.

References: 
 >Setting RadioButton programatically (From: Uwe Schlosser <email@hidden>)

  • Prev by Date: Re: Checkbox group box (was Re: Coloring NSBox background?)
  • Next by Date: Re: Checkbox group box (was Re: Coloring NSBox background?)
  • Previous by thread: Setting RadioButton programatically
  • Next by thread: text encodings
  • Index(es):
    • Date
    • Thread