Use FntCharsWidth
This is a rough example:
x = (total_width - FntCharsWidth(MyString, StrLen(MyString))) >> 1;
Michael
-----Original Message-----
From: Gavin Maxwell [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 28 November 2001 5:42 PM
To: Palm Developer Forum
Subject: RE: How to center justify text in text field.
Might be easier to ditch the field and use WinDrawChars(...) and calculate
the justification yourself - pretty simple.
Gavin.
-----Original Message-----
From: Ravindra [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 6 September 2001 4:32 PM
To: Palm Developer Forum
Subject: How to center justify text in text field.
Hi Friends,
Can any body help me to set center justify text field.
In my application my test field value is continus changes within say 5 times
in a second and it will be display different length size text with different
font setting.
So I want my text field to center justify .
How to do this?
Thanx in advance.
regards,
Ravi
--------------------------------------------------------------
Nova Software, Mumbai, India
--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/