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 April 2nd, 2007, 07:49 AM
Authorized User
 
Join Date: Mar 2007
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default textboxes or list boxes with multiple fore color

i m developin an application for a school in dubai.
i need to list the students name in a multiline text box n differentiate them based on the gender(like green for boys n red for girls).
i think it can be done with list boxes.
but i need it in multiline text boxes.
 
Old April 2nd, 2007, 11:03 AM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

You need to use a RichTextBox. This allows formatting, including color. (A standard TextBox control will not be able to do this.)
 
Old April 2nd, 2007, 01:33 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

or you can use a MSFlexGrid (it is what I will do, it is much easier to display columns of data)

"There are two ways to write error-free programs. Only the third one works."
Unknown
 
Old April 2nd, 2007, 11:45 PM
Authorized User
 
Join Date: Mar 2007
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i have to allow users to edit that list.
but i think both richtext box and flex r read only.
is there any other way?

 
Old April 3rd, 2007, 12:18 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

I don't think you are right about the rich text box.
I believe it acts like a subset of Word.
It [u]can</u> be read only, but I don’t think it has to be.
Seems to me (if I recall properly) it has a .Save method...
 
Old April 20th, 2007, 05:04 PM
Friend of Wrox
 
Join Date: May 2006
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The RichTextBox is definately not "read only". It acts very much like a standard textbox, but it works with rtf (rich text format) data. In other words, you can use it for the purpose you describe.

Another (probably better) option is to use a standard Listview. You can easily change the color of each cell.

Woody Z
http://www.learntoprogramnow.com
How to use a forum to help solve problems





Similar Threads
Thread Thread Starter Forum Replies Last Post
VBScript to list Textboxes on page Ron Howerton VB How-To 5 October 5th, 2007 08:28 AM
Help: character and multiple textboxes snoopy_sweden Javascript How-To 0 February 20th, 2007 04:08 AM
COLOR CHANGE IN TEXTBOXES Rashad Javascript How-To 5 November 28th, 2005 06:06 AM
populating textboxes using list/Menu rylemer Javascript 0 November 23rd, 2005 10:05 PM
SQL , List Boxes/Menu Boxes, DB's Ginzu3 Classic ASP Databases 1 June 30th, 2003 04:07 AM





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