Solved

Control to use as an Editor with Correct New Line registering

Posted on 2004-04-14
11
234 Views
Last Modified: 2013-12-25
Hi Everyone,
I need to find/create a control that is reliable enough to use an editor on a VB form. So far i've tried textbox, mh3dtext, fpmemo and they are all buggy when it comes to registering new line characters. I need a control that when i put in some text, and click a button it breaks down each line in 35 char lots and a set no of lines. I can do the breaking down part, but only!! when the control returns me the new line character correctly i.e. cr/lf. Otherwise i've no means of knowing each line's text at a time in the textbox. Is there a control that I can access a line at a time, and resembles an editor?

Any help would be appreciated!!
0
Comment
Question by:tiseffies
  • 7
  • 3
11 Comments
 
LVL 3

Accepted Solution

by:
redfordb earned 20 total points
ID: 10831785
Have you tried the Rich Textbox that comes with VB ?
0
 

Author Comment

by:tiseffies
ID: 10837995
Hi Redfordb
Last time I checked, Rich Textbox doesn't recognise new lines at all.... Returning the Text value is the whole line without any delimiter!!
0
 

Author Comment

by:tiseffies
ID: 10838099
I've given it a shot using the Split function... though it still contains the new line recognition bug :(
Maybe i have to create my own??
0
 

Author Comment

by:tiseffies
ID: 10838352
Another problem i have with Richtextbox is that i can't have the vertical scrollbar fixed to always be there. It seems there are only 4 options, and the vertical option appears only when needed. I need to fix the chars across a line to 35 chars. I have no other way of doing this unless i fix the width of the control to 4000 and have the scrollbar fixed. Any other ideas?
Thanks
0
 

Author Comment

by:tiseffies
ID: 10839751
More Info:
I need a control that allows the right-click of copy and paste functionality.
P.s. hope i haven't confused everyone so far..
Cheers
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:tiseffies
ID: 10875266
Can anyone tell me whether there is a font that allows the same number of chars across a textbox (with wordrwap = true) all the time? whether normal or large windows fonts  are set? I thought Luicida Console was, but it isn't :(
0
 
LVL 8

Assisted Solution

by:rajaloysious
rajaloysious earned 480 total points
ID: 10898328
To always show the scrollbar
---------------
RichText1.ScrollBars = 2     '2 is for vertical
RichText1.DisableNoScroll = 1     ' 1 is for always showing the sdcrollbar
--------
I need a control that allows the right-click of copy and paste functionality
VB Text box can be used.
If you want this to be done in RichText,
RichTextBox1.AutoVerbMenu = True ' *****
-----------------
Can anyone tell me whether there is a font that allows the same number of chars across a textbox (with wordrwap = true) all the time?
-No --- depends upon the font size
0
 
LVL 8

Expert Comment

by:rajaloysious
ID: 10898338
I guess all your three questions are answered in my previous post.
0
 

Author Comment

by:tiseffies
ID: 10914708
One more question. There seems to be a glitch in the Rich Text box control
When i copy and paste text, say a word, and I realise i have to undo the paste, cause it exceeds the char maximum for the line, i set the keyascii value to 0 in the keypress event. Even though this undoes the word in other textbox controls, for richtextbox it doesnt. Any ideas?
0
 
LVL 8

Expert Comment

by:rajaloysious
ID: 10915565
Before you paste, check the number of chars copied in the clipboard.
If (it is less than or equal to the the number required,) then
RichTextBox1.AutoVerbMenu = True
else
RichTextBox1.AutoVerbMenu = False
endif
.
I guess I have answered all you previous questions.

You need to post new questions seperately. Thanks for your understanding. -)
Good luck
0
 

Author Comment

by:tiseffies
ID: 10924483
You'll find the problems I encountered fall under original problem, it's not a separate issue, though I perhaps left it vague. That's cause I was willing to accept alternative possible solutions you guys would offer, as I was still looking around for the nearest answer to my issue.
I appreciate your help and Thanks to all who attempted to help me out!!! :-)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now