[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.swt] Re: Saving and retrieving StyledText to/from database
|
Alex Chan <hcbing@xxxxxxxxx> wrote:
> Hi all,
>
> I'm trying out a simple process of entering text into a text field
> within my RCP application, applying several styles such as bold and
> italics to the selected portion of the text entered, and then save it
> into my database via MySQL.
>
> So far, I have managed to get the intended & selected portion of the
> text to display the correct styles on my UI application (upon
> executing bold or italic functions but before saving to the
> database). The function I used also allows me to revert back to my
> original text before formatting by running through the same function
> again.
> However, I am currently wondering how would I be able to save the text
> into my database, retrieve and display them on my UI application with
> the correct formatting?
>
[snip]
Create a table to persist the StyleInfo values for the StyledText.
Then when you read the text, also read its StyleInfo values and apply them.
--
Sunil