473,387 Members | 1,621 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

vbtab don't work...


hello

In fact the purpose of the code is to print some strings that i don't know
the length before. But i want them to appears in two or three columns. So i
thought that i could with the code (see the link in previous post) using
vbtab. But vbtab has no effect to the string !!!!
Hope this is clearer...
thanks for your help
pascal
http://www.scalpa.info
Apr 11 '07 #1
4 4488
On Apr 11, 8:59 am, "Pascal" <scalpano...@wanadoo.rfwrote:
hello

In fact the purpose of the code is to print some strings that i don't know
the length before. But i want them to appears in two or three columns. So i
thought that i could with the code (see the link in previous post) using
vbtab. But vbtab has no effect to the string !!!!
Hope this is clearer...
thanks for your help
pascal

http://www.scalpa.info
You should be able to use ControlChars.Tab instead.

Thanks,

Seth Rowe

Apr 11 '07 #2
Pascal wrote:
In fact the purpose of the code is to print some strings that i don't
know the length before. But i want them to appears in two or three
columns. So i thought that i could with the code (see the link in
previous post) using vbtab. But vbtab has no effect to the string !!!!
Hope this is clearer...
thanks for your help
Whatever entity you are using to display the strings does not "know" what
you mean by putting tabs in.

The simplest way would to get columns be to use a fixed-width font like
Courier and pad strings to the desired position with PadLeft and/or PadRight
as appropriate.

Andrew
Apr 11 '07 #3
As Andrew said, many (most) of the standard controls don't know how to
display a tab. I believe that the textbox shows a small rectangle for
the character.

The RichTextBox does support the tab, but it is also a bit dangerous:
If you have a line with short text and a tab, and another line with
fairly long text and a tab, your columns may not line up correctly.
You could handle the issue by forcing a fixed width font, again as
Andrew suggested; use the ".Padright" method on your strings to force
additional spaces as needed.

I don't know what your aplication is doing, but perhaps a listview in
detail mode may be a better choice. You can set up column sizes
independent of the text size.

Shane

Apr 11 '07 #4
"rowe_newsgroups" <ro********@yahoo.comschrieb:
>In fact the purpose of the code is to print some strings that i don't
know
the length before. But i want them to appears in two or three columns. So
i
thought that i could with the code (see the link in previous post) using
vbtab. But vbtab has no effect to the string !!!!
Hope this is clearer...
thanks for your help
pascal

http://www.scalpa.info

You should be able to use ControlChars.Tab instead.
A tab is a tab is a tab, irregardless of whether you use 'vbTab',
'ControlChars.Tab', or 'ChrW(9)'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Apr 11 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

303
by: mike420 | last post by:
In the context of LATEX, some Pythonista asked what the big successes of Lisp were. I think there were at least three *big* successes. a. orbitz.com web site uses Lisp for algorithms, etc. b....
3
by: Douglas Buchanan | last post by:
Buttons don't work if form is opened on startup A2k If 'frmMain' is set to open by default at startup none of the buttons work. If 'frmMain' is opened from the database window then all the...
28
by: DFS | last post by:
I'm unfortunately about to change, or sever, a two-year relationship with a very slow-paying client. Most of the 15 invoices I've sent them arrive 6 to 8 weeks late, and usually only after...
2
by: Mori | last post by:
Can some one translate this into C# for me: myString = "This is some text" & vbTab & "and some more text...." I cannot find an example of Tab characters being used. I've posted something...
19
by: LP | last post by:
I am using (trying to) CR version XI, cascading parameters feature works it asks user to enter params. But if page is resubmitted. It prompts for params again. I did set...
3
by: Katrina | last post by:
How does one display a tab in a Label in VB.NET? vbTab does not seem to work.
4
by: teo | last post by:
I have a LISTBOX how to insert VBTab or Blank spaces ? in Example Listbox1.Items.Add ("Hallo" & vbTab & "GoodMorning") or Listbox1.Items.Add ("Hallo" & " " & "GoodMorning") ...
5
by: TOD3 | last post by:
Does anyone know how to use a number with VBTab? Its to display in a list box but name how many spaces to jump across? In comal it is Tab(30) that would move the cursor to position 30.
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.