Wrox Programmer Forums
|
Visual Studio 2008 For discussing Visual Studio 2008. Please post code questions about a specific language (C#, VB, ASP.NET, etc) in the correct language forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Studio 2008 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 May 13th, 2009, 11:05 AM
Registered User
 
Join Date: May 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Tab in a listbox

Hi to all

I am new to this forum .. I am trying to tab a series of data in a list box listbox1 - the data is an array of variables called User - I am trying to use the vB tab between the variables
but it does not look right - The spaces size and the character size on screen when printed are not the same thereby causing misalignment for long names -

I have tried to use the format string but i end up with the same error because the space size .

I could put character padding but it does not look nice and even then because each charater has a different size it does not always fall right .

Is there a way to do it with a data grid view ? I don;t know how to link the data grid view to an array - I know how to use it with a data set - is there a way to link an internal array directly to a data grid box -

Any hint - any comment - any help would ne moast welcomed

Gerald - From Mauritius

PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'OpenFileDialog1.Filter = "Text files (*.CSV)|*.CSV"
'OpenFileDialog1.ShowDialog() 'display Open dialog box
'streamtest(OpenFileDialog1.FileName)
Dim f AsNew FormReport
Dim INDEX = 1
For INDEX = 1 To 400
'MsgBox(User(INDEX).NameFirst.Length)
'If User(INDEX).tagId <> "0" Then
f.ListBox1.Items.Add( _
INDEX & vbTab & _
User(INDEX).tagId & vbTab & _
User(INDEX).WeightNominal & vbTab & _
User(INDEX).WeightActual & vbTab & _
User(INDEX).Status & vbTab & _
User(INDEX).lastTransId & vbTab & _
User(INDEX).LastDateLogged & vbTab & _
User(INDEX).LastDoorId & vbTab & _
User(INDEX).RelaxWeightControl & vbTab & _
User(INDEX).NameLast & vbTab & _
User(INDEX).NameFirst)
'End If
Next INDEX
f.ShowDialog()
EndSub
 
Old May 13th, 2009, 11:45 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

probably you need a listview. Anyway vbtab is deprecated several version before.. you have a class named controlchars...
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========
 
Old May 13th, 2009, 12:11 PM
Registered User
 
Join Date: May 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks

but what is a list view and how to use control characters here ?
 
Old May 13th, 2009, 12:50 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

with a listview you have several columns without the lines, just the listview you have in explorer in your windows. Google about it.
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to disable a tab on a tab control. dbradley VB.NET 6 April 14th, 2011 10:04 AM
multiple Listbox values in another listbox terryv Excel VBA 0 June 27th, 2007 07:01 AM
Tab + ASP Adam H-W Classic ASP Basics 2 April 25th, 2007 04:52 AM
I can not see the "security" tab amouzeshgah BOOK: Beginning ASP.NET 1.0 3 August 28th, 2006 03:16 AM
I'm back :) Listbox var from listbox MichaelTJ .NET Web Services 2 October 21st, 2003 07:06 PM





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