Mar 10, 2008, 02:36 AM
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...
Mar 10, 2008, 02:46 AM
Not sure which text control you mean, but you can usually do this and have it work:
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.