objective c - Simple NSButton Hiding Another NSButton -
i have 2 nsbuttons, both ibactions. when click 1 of buttons, want other button hidden. can make them hide themselves, can't figure out how hide other one. actual implementation have 'start' button, hidden until user finished doing tasks, shows again other objects being hidden.
thanks help!
@interface label : nsobject { iboutlet nstextfield *mytextfield; } -(ibaction)btntest1:(id)sender; -(ibaction)btntest2:(id)sender; -(ibaction)btntest1:(id)sender { mytextfield.stringvalue = @"you selected 1st button"; nsbutton *tempbutton = sender; [tempbutton sethidden:yes]; } -(ibaction)btntest2:(id)sender { mytextfield.stringvalue = @"you selected 2nd button"; nsbutton *tempbutton = sender; [tempbutton sethidden:yes]; }
@interface label : nsobject { iboutlet nstextfield *mytextfield; iboutlet nsbutton *btn1; iboutlet nsbutton *btn2; } in method : [btn1 sethidden: yes] btn2 same.
Comments
Post a Comment