Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

chidambaram

macrumors member
Original poster
Mar 9, 2008
67
0
hi all,

I am working a carbon application in xcode.

How can i set the data to the text view control?

plz give some sample code...

Thanks in advance and urgent plz...
 

Sayer

macrumors 6502a
Jan 4, 2002
981
0
Austin, TX
Not sure which text control you mean, but you can usually do this and have it work:

Code:
ControlRef tmpControl;
ControlID tmpControlID;

tmpControlID.id = 102;
			
tmpControlID.signature = 'Flat';
			
GetControlByID(GetControlOwner(theControl), &tmpControlID, &tmpControl);

SetControlTitleWithCFString(tmpControl, CFSTR("Text can be changed dynamically."));

This would work on a static text control, or any control with a title, obviously. You can also use SetControlProperty() and use the kControlStaticTextTextTag or kControlStaticTextCFStringTag constant, but you also have to provide a bunch of other params.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.