Question Adding spell check to a rich text box? VS orcas? Help please I have some questions

mrtutorial08

Member
Joined
Sep 4, 2008
Messages
20
Programming Experience
1-3
Hi everyone...


Could some 1 tell me how to spell check a rich text box..I don't want to use wpf nor do I want to use Interop Microsoft Word..

What is VS orcas edition(something like that) I have VS EE...
I have VS Orcas but I never tried it.. What is it anyways..

I am building a word processor and have some problems....The picture shows
one of my main problems...

Normal Size



Maximized



Any way I could anchor the box to stay in the middle and the height should change to the height of a normal paper....

Also any way instead of using the rich text box's scroll bar could I use a scroll bar that is docked to the right...(like in Microsoft Word)
 

JohnH

VB.NET Forum Moderator
Staff member
Joined
Dec 17, 2005
Messages
15,346
Location
Norway
Programming Experience
10+
Also any way instead of using the rich text box's scroll bar could I use a scroll bar that is docked to the right...(like in Microsoft Word)
If AutoScroll property of form is set to True it will display scrollbars automatically when controls size/location extends its clientsize. RichTextBox scrollbars can be turned off, it will give you some work managing "pages" in order for text to never fill more than exactly one "page" before it flows to next.
 

mrtutorial08

Member
Joined
Sep 4, 2008
Messages
20
Programming Experience
1-3
Well i succeeded in turning of the rtb's scroll bar but now i am stuck here:

1. Disable Rtb's scrollbar(well i am done with that)
2. Now put a vertical scroll bar on the form(i know how to do that)
3. Relate the scroll bar to the rich text box(how do i do that)

...Also does any1 know answers to other questions...

Remember that I use Visual Basic Express Edition
And i have Orcas Edition too(i never tried it though lol)
 

JohnH

VB.NET Forum Moderator
Staff member
Joined
Dec 17, 2005
Messages
15,346
Location
Norway
Programming Experience
10+
2. Why would you do that? As I said use AutoScroll.

3. How so? The scroll relates to the visible part of client controls. That is what you are seeing in the word processing application too, the "page" control is greater than screen/application window and when you use the window scroll it moves parts of the control into client view. That is what the Autoscroll does automatically. You need to set an appropriate page size for your RichTextBox control.
 

mrtutorial08

Member
Joined
Sep 4, 2008
Messages
20
Programming Experience
1-3
well it worked thanks but I forgot to save it so it closed... Now when I change the size of the rich text box to a normal page's size its bigger than the form(duhh) but when I enable auto scroll of the FORM nothing happens.. I don't see scroll bars..

Any Help Please?


EDIT: Now for some reason it works when I put the rich text box in a group box and then put the group box into the panel... the panel's auto scroll works but the form's doesn't.. wired isn't it...

Also guys Could some1 like give me some code which makes a richtextbox adjust its size to the page selected in the page setup dialog... Thanks!
 
Last edited:

JohnH

VB.NET Forum Moderator
Staff member
Joined
Dec 17, 2005
Messages
15,346
Location
Norway
Programming Experience
10+
Now for some reason it works when I put the rich text box in a group box and then put the group box into the panel... the panel's auto scroll works but the form's doesn't.. wired isn't it...
Weird. Your project could be corrupt, try to create a new project, set form autoscroll and move any control outside visible client area. You should be seeing scrollbars on form immediately in designer.
 

mrtutorial08

Member
Joined
Sep 4, 2008
Messages
20
Programming Experience
1-3
Well I got over the problem.. Nothing Corrupt just had to reload the project 10 times...

Welll Could some1 please give me like a code snippet that could adjust a rich text box to the page setup dialog...

Please dont tell me to handle event or tell me"You need to do this and then parse everyline and then do some advanced stuff to get that to happen"

Could any1 give a code snippet?

Also anyway I could have font boxes not dialogs but combo boxes which adjust the selected font in the rich text box when a font is chosen..also code some1 give a size combo box...
 

TomK

Member
Joined
Jul 31, 2008
Messages
5
Programming Experience
Beginner
Page settings

you could prob. just add a "pagesetupdialog" component. Then look at the

Code:
pagesetupdialog.pagesettings
Just a thought..



I'm more interested in the spell checking a Richtextbox, myself. Did you find any info about that in your searches? Or anyone got a good link to share?
 

mrtutorial08

Member
Joined
Sep 4, 2008
Messages
20
Programming Experience
1-3
Well I do have a spell check(its very limited though)
My spell check is a separate form in which there is a text box and a spell check and close buttons...When a person puts(for example) hey in to the text box and clicks spell check it will tell the person if its is right or wrong.... That's all..

Well I have a page setup dialog I am trying to get a way so that the selected page in the page setup dialog changes the size of the rich text box accordingly....
 

Stonkie

Well-known member
Joined
Sep 12, 2007
Messages
279
Programming Experience
1-3
I think open office's spell checking system uses plain text files with the list of all available words in each language. Maybe the license permits using it since it's open source...

All you'll have to do is check each word in the list. If that's not efficient enough, you can split each word in a binary (alphabetic) tree for searching them.

Look here : Dictionaries - OpenOffice.org Wiki

Get the English (USA) one and open it as zip. You'll find a .dic file. It's a text file. There seems to be a certain notation and you'll have to read a bit more in the wiki to figure it out, but the readme file says it's covered by the LGPL so it should be free to use (I don't make any commitment on that).
 
Last edited:
Top Bottom