Solved

Control to use as an Editor with Correct New Line registering

Posted on 2004-04-14
11
239 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 

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
 

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

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…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

752 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