Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 Basics 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
  #1 (permalink)  
Old January 15th, 2004, 10:44 PM
Authorized User
Join Date: Jan 2004
Location: Adelaide, SA, Australia.
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default Change line in VB.net

Hello there,
                  i want to know if there is a command to change lines automatically on a multiline text box. This should be done from the source code.
I am trying to display each element of an array on a different line in a multiline text box.


  #2 (permalink)  
Old January 16th, 2004, 07:58 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts

Do you want to CHANGE the line or just output an array into a multi-line textbox? If it's just a question of outputting the lines, then you just need to append a NewLine character after each array element.

Work smarter, not harder.
  #3 (permalink)  
Old January 16th, 2004, 02:27 PM
Friend of Wrox
Join Date: Jun 2003
Location: Sparks, NV, USA.
Posts: 101
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jlick

Well, there are many ways you could change a line through code.

Since you have the data in an array, you could simple clear the textbox, and repopulate from the array. (See the previous post.)

If you need to do this in multiple places, you could create a class that inherits from the base array to hold your data. You add a property to the class that will take all the data in the array, and concatinates it to a string. Have the class use the databinding events to let the textbox know when a change occured, and bind the text box to the property. You could have the property let then have the logic step through the text and update the array (if the textbox is read/write).

I don't remember the data binding events off the top of my head, but they should be reasonable to find, and you are probably aware of them if you are doing data binding already.

John R Lick

Similar Threads
Thread Thread Starter Forum Replies Last Post
change row color of DataGrid in VB.Net (Windows ap remya1000 .NET Framework 1.x 2 December 31st, 2007 03:56 AM
Using VB.Net to change the SQL Statment yicksang BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 1 March 31st, 2006 04:17 AM
Change Series Color in Stacked Line Markers chart Jell Pro VB.NET 2002/2003 0 July 13th, 2005 06:42 AM
Change Series colors in Stacked Line Marker chart Jell VB.NET 2002/2003 Basics 0 July 13th, 2005 04:01 AM
COULD ANYONE CHANGE THIS C# CODE TO VB anand_asv General .NET 1 April 1st, 2005 11:36 AM

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