[comp.sys.mac.programmer] Changing Radio Button Titles

rk39+@andrew.cmu.edu (Robert Joseph Kuszewski) (06/06/90)

Thanks to everyone who told me how to use pop-up menus from a modal dialog.  But now I have another question:

Does anyone know how to change the title of a radio button within a program?

I can't seem to find any routines which will work.

Thanks in advance,

Bob
Executive Member
Team Clueless

rdclark@Apple.COM (Richard Clark) (06/06/90)

rk39+@andrew.cmu.edu (Robert Joseph Kuszewski) writes:
>Does anyone know how to change the title of a radio button within a program?

Bob --

  Try:
    PROCEDURE SetCTitle(ctl: ControlHandle; title: STR255);
  in the control manager.

  If the button is in a dialog, you can use GetDItem to get the handle to the 
control. If it's in a window, your best bet is to store the ControlHandle 
somewhere at the time you create it.


-- 
-----------------------------+-----------------------------------------------
Richard Clark                | "If you don't know where you're going,
Instructor/Designer          |  don't go there" -- Sybalski's Law	
Apple Developer University   +-----------------------------------------------
AppleLink, GEnie, Delphi, MCI, Internet: rdclark  CI$: 71401, 2071

-- 
-----------------------------+-----------------------------------------------
Richard Clark                | "If you don't know where you're going,
Instructor/Designer          |  don't go there" -- Sybalski's Law	
Apple Developer University   +-----------------------------------------------
AppleLink, GEnie, Delphi, MCI, Internet: rdclark  CI$: 71401, 2071

zben@umd5.umd.edu (Ben Cranston) (06/07/90)

rk39+@andrew.cmu.edu (Robert Joseph Kuszewski) writes:
> Does anyone know how to change the title of a radio button within a program?

In article <41661@apple.Apple.COM> rdclark@Apple.COM (Richard Clark) writes:
>    PROCEDURE SetCTitle(ctl: ControlHandle; title: STR255);
>  If the button is in a dialog, you can use GetDItem to get the handle to the 
> control. If it's in a window, your best bet is to store the ControlHandle 
> somewhere at the time you create it.

Or else put something recognizable in the contrlRfCon of each of your
controls, then search the chain from the window's controlList through
nextControl of each control handle.
-- 

"It's all about Power, it's all about Control
 All the rest is lies for the credulous"
-- Man-in-the-street interview in Romania one week after Ceaucescu execution.