?
Solved

How can I avoid the split of word ?

Posted on 2003-02-19
9
Medium Priority
?
240 Views
Last Modified: 2010-05-01
I would like to input a long text string into richtextbox ( or text box ) as follows :

     richtextbox1.text = str1

I don't want to split a word and display in two lines. How can I do that ?
0
Comment
Question by:BarryTang
[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
9 Comments
 
LVL 9

Expert Comment

by:Valliappan AN
ID: 7985816
Normally, textbox won't wrap text, unless you set MultiLine property to true.

In Richtextbox, you can do that by setting the rightmargin to a larger value like this:

Richtextbox1.RightMargin = 50000

and you can set its scrollbars property to Both or Horizontal as need be.

Regards.
0
 
LVL 1

Expert Comment

by:sazhagianambi
ID: 7986203
Hi,

In Both TextBox and RichTextBox Controls there is a Prperty Called Multilne. Set that to False. So I didn't allow u to Wrap Text.


Regards,
Nambi
0
 
LVL 1

Expert Comment

by:sazhagianambi
ID: 7986224
Hi,

In Both TextBox and RichTextBox Controls there is a Prperty Called Multilne. Set that to False. So I didn't allow u to Wrap Text.


Regards,
Nambi
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 9

Expert Comment

by:Valliappan AN
ID: 7991599
ya, sazhagianambi is right that Multiline property is there in both. But if with Multiline set to true, in RTB and still you want a longer length of line to be displayed without wrapping, then you can set the rightmargin property to a larger value as already mentioned by me.

Cheers

0
 

Author Comment

by:BarryTang
ID: 7993562
Actually my requirement is to use multiline display and find out if there is simple solution so that a word will not split into two parts.

Since my text is very long so that it is not good for the user to scroll if display on just one line.

Barry
0
 
LVL 1

Expert Comment

by:sazhagianambi
ID: 7997970
Hi,

If the Length Of Word Exceeds the RichtextBox's Width It automatically Split the Word.

If the Length Of Word Wquals to the RichtextBox's Width It Simply accomadates that Word.

So U Must Find Out the Max Length Of the Word in Your Strig and assign that value to RichTextBox's Width.

I Hope this Will Solve Your Problem. Possible i'll Post Code for that Very soon.

Regards,
Nambi
0
 
LVL 9

Expert Comment

by:Valliappan AN
ID: 8006248
Just changing the RTB width will not solve it I suppose, but the RightMargin property of RTB to be increased as already suggested by me and set the MultiLine to True (which is default in RTB I suppose).

Hope that helps.
0
 
LVL 16

Expert Comment

by:twalgrave
ID: 8049915
BarryTang,
You have 17 opened questions as of this date.  
I will be posting in each of these questions.  
Please take care of your opened questions older than 30 days by clicking on your logon name link and looking for UnlockedQ or using the links I am providing below.  
Please finalize these within 72 hours or I will ask administration to look into your account at that point.  If you have questions, please ask and I will provide assistance.  

http://www.experts-exchange.com/Databases/Microsoft_SQL_Server/Q_20187331.html
http://www.experts-exchange.com/Databases/Microsoft_SQL_Server/Q_20133725.html
http://www.experts-exchange.com/Databases/Microsoft_SQL_Server/Q_20088012.html
http://www.experts-exchange.com/Databases/Microsoft_SQL_Server/Q_20083509.html
http://www.experts-exchange.com/Miscellaneous/Games/Q_20382035.html
http://www.experts-exchange.com/Programming/Game_Development/Q_20382294.html
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20534626.html
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20521771.html
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20515842.html
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20513575.html
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20493221.html
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20436510.html
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20399960.html
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20395868.html
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20375410.html
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20373966.html
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20372811.html

Thank you.
0
 

Accepted Solution

by:
SpideyMod earned 0 total points
ID: 8369250
Administrative Action - PAQ'd and points NOT refunded.

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
Suggested Courses
Course of the Month9 days, 9 hours left to enroll

762 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