Solved

Control to use as an Editor with Correct New Line registering

Posted on 2004-04-14
11
231 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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

708 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

12 Experts available now in Live!

Get 1:1 Help Now