Luca,
Have you tried changing the order of things ie. Putting the
FldGetAttributes after the FldRecalculateField.
The order you're doing things in at the moment will set the value of the
singleLine member back to what it was before you recalculated the field.
I think that should solve it.
Regards
John  

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Luca
Bertoncello
Sent: 24 October 2006 12:07
To: Palm Developer Forum
Subject: AW: re: Multiplelines Fields and "\n"

"Carmine Castiglia" <[EMAIL PROTECTED]> schrieb:

> I found this in another thread after doing a search for "multiline":
> 
>  ---------------
> 
> You need to call FldRecalculateField after calling FldSetTextPtr with 
> a multi-line field.
> 
> I was caught by this gotcha a little while ago. The docs do say to do
it... 

I tryed it, of course...

I found now the problem, but unfortunately, it generates another
problem... :(

So, I want to have this multiline-field readonly, and I wrote this:

  FldGetAttributes(FrmGetObjectPtr(frm, FrmGetObjectIndex(frm,
idFieldTelNumber)), &attrText);
  attrText.editable = 0;

  FldSetTextPtr(FrmGetObjectPtr(frm, FrmGetObjectIndex(frm,
idFieldText)),
sms->text);
  FldRecalculateField(FrmGetObjectPtr(frm, FrmGetObjectIndex(frm,
idFieldText)), true);
  FldSetAttributes(FrmGetObjectPtr(frm, FrmGetObjectIndex(frm,
idFieldText)), &attrText);

So, if I use FldSetAttribute, I have a readonly field, but not
multipleline.
If I don't use it, I have a multiline field, but not readonly...

What can I do?

Thanks
Luca Bertoncello
([EMAIL PROTECTED])


--
For information on using the PalmSource Developer Forums, or to
unsubscribe, please see http://www.palmos.com/dev/support/forums/

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to