The alignment information should be contained in the TextStyleData
property of the edit field. If it is, then you can just store this data
in your file - this will also store the text size, colour, font, styles
etc of all your text. Otherwise, you could use one of the available
StyleData classes which would allow you to get the start positions for
each style run allowing you to then simply store the alignment property
for each style run in your file. You can probably find the classes in
the developer section of the RB website.
William Cannings
On Friday, August 30, 2002, at 10:36 pm, Saad Abbasi wrote:
How the HELL can I save alignment information in a document.
I've tried this:
Dim i as Integer
Dim f as Folderitem
Dim b as Binarystream
f=GetSaveFolderItem("text/plain")
b=f.CreateBinaryFile("text/plain")
For i=1 to Len(EditField1.Text)
EditField1.SelStart=i
b.WriteLong EditField1.Selalignment
Next
The above method works perfectly but its slow as hell. Can
anyone please provide a more efficient routine for saving
alignment information in a file.
Thanks in advance,
Saad Abbasi
---------------------------------------------------------------
---------------------------------------------------------------
Free eMail and Web Site for Macintosh Users
http://www.applelinks.com/
----------------------------------------------------
The Think Different Store
http://store.applelinks.com/
---------------------------------------------------------------
---------------------------------------------------------------
---
Subscribe to the digest:
<mailto:realbasic-nug-digest at lists dot realsoftware dot com>
Unsubscribe:
<mailto:realbasic-nug-off at lists dot realsoftware dot com>
|