Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 28th, 2003, 01:59 AM
Registered User
 
Join Date: Aug 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Rich Text Box Horizontal Scroll Bar

I am trying to ouput a Word document into a Rich Text Box control. I have the Scrollbars property set to rtfBoth. The horizontal scroll bar does not appear and the text wraps.

There is an article on Microsoft Knowledge Base Q175501 which suggests the following:

Dim x As String
x = RichTextBox1.TextRTF
RichTextBox1.TextRTF = x

But this does not appear to work. How can I get the horizontal scroll bars to appear - or is there a better control for my purposes?

 
Old November 2nd, 2005, 02:11 AM
Registered User
 
Join Date: Nov 2005
Posts: 1
Thanks: 0
Thanked 2 Times in 1 Post
Default

Hey, I was looking for the same answer, and I found it, came back here to show you because I was mad when I couldn't find it.

RichTextBox1.WordWrap = False
RichTextBox1.ScrollBars = RichTextBoxScrollBars.ForcedBoth

That adds horizontal and veritcal scroll bars and allows for both horizontal and vertical scrolling.

The Following 2 Users Say Thank You to Nexeo For This Useful Post:
robertolopes (December 15th, 2009)
 
Old August 2nd, 2006, 08:37 AM
Registered User
 
Join Date: Aug 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you Nexeo ..!
 
Old September 18th, 2006, 07:56 PM
Registered User
 
Join Date: Sep 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

try change the value for rightmargin to say 10000. that should do it in vfp

 
Old October 3rd, 2008, 01:11 AM
Registered User
 
Join Date: Oct 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Whew! Thank you Nexo for posting that. I found the awnser and it solved my problem.


 
Old December 15th, 2009, 11:54 PM
Registered User
 
Join Date: Oct 2004
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Thumbs up Rich Text Box Horizontal Scroll Bar

Hey, Thanks a lot for your tip! It worked for me!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Add a Horizontal Scroll Bar to a List Box in VBA hewstone999 Access VBA 1 February 28th, 2008 08:31 AM
Horizontal scroll bar when childform is maximize juzjess C# 2005 1 November 7th, 2007 05:04 AM
Rich Text Box aliirfan84 ASP.NET 2.0 Professional 1 February 23rd, 2007 06:35 AM
Rich Text Box spike010101 Pro VB 6 1 September 29th, 2004 02:37 AM
RICH TEXT BOX priyanka123 VB How-To 0 May 6th, 2004 01:46 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.