Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB 6
|
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 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 March 1st, 2004, 02:18 AM
Authorized User
 
Join Date: Jun 2003
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default Multiline Text in Rich TextBox

I tried to create a multiline text in a Rich TextBox like a Ordinary Text Box (Creating new lines with Chr(10) and Chr(13)). Unlike Ordinary TextBox, the Rich TextBox shows only the first line. Please help. Thanks in advance.
 
Old March 1st, 2004, 05:33 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 231
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Check the Rich Text Box's 'Multiline' property, it must be set to True otherwise you will only see the first line.

Regards
Owain Williams
 
Old March 1st, 2004, 07:50 AM
Authorized User
 
Join Date: Jun 2003
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Owain. Multiline Property was True. I got the solution. I did not write the .Text property (with the Rich TextBox) in the code. In case of ordinary TextBox this works fine as the Default property is Text

Regards

Niaz
 
Old March 1st, 2004, 07:57 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 231
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It is good programing practice to never rely on the default properties of an object. I will always use .Text for text boxes and .Caption for lables even though it will work without. This avoids these types of problems from cropping up in the first place.

Regards
Owain Williams





Similar Threads
Thread Thread Starter Forum Replies Last Post
AcceptsReturn multiline textbox suzila General .NET 19 March 10th, 2006 02:28 AM
Storing Multiline Textbox value. rupen Classic ASP Basics 7 July 20th, 2005 02:21 PM
Regular Expression for Multiline TextBox Dilip Nagle General .NET 3 January 6th, 2005 02:22 AM
How to make an uneditable multiline textbox ltdanp21 VS.NET 2002/2003 2 June 16th, 2004 06:19 PM





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