Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » RichText,QTF,RTF... » Spelling Dictionary?
Re: Spelling Dictionary? [message #21869 is a reply to message #21867] Mon, 08 June 2009 19:46 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13980
Registered: November 2005
Ultimate Member
jeremy_c wrote on Mon, 08 June 2009 13:41

Ok, this is working now, thanks. Is this the right way to handle this problem?

String content = GetFromDb(); // dummy function for example sake

if (content.Find("[%EN-US") == -1)
{
    content = "[%EN-US " + content " +]");
    UpdateDb(content); // dummy function again
}

editor.SetData(content);


That seems a bit unintuitive. It is nice, however, that each document can contain it's own language attributes, however, I would think maybe RichEdit should contain a default language setting that if the doc does not specify, use it? i.e.

editor.SetDefaultLanguage("EN-US");


?

Jeremy



Well, obviously, the problem is the default language. I usually solve it by SetQTF("[%EN-US ") (actually, CS-CZ Smile in default constructor. In that case, if text is being created, it will get "EN-US" langauge.

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Editor Toolbar
Next Topic: Spelling Button on RichEdit
Goto Forum:
  


Current Time: Tue May 21 07:24:00 CEST 2024

Total time taken to generate the page: 0.02265 seconds