Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Control to use as an Editor with Correct New Line registering

Posted on 2004-04-14
11
Medium Priority
?
243 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 80 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

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 1920 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

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…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
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…

886 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