|
-
Oct 7th, 2002, 05:55 AM
#1
Thread Starter
Hyperactive Member
set the tab space
hi friends,
can we set the vbTab property. i mean by default it is the system specified no. of spaces for vbtab, but i want vbtab to make the space of two spaces.
thanx,
-
Oct 7th, 2002, 06:01 AM
#2
Frenzied Member
You can make your own if you like.
You can have a global variable MyTab declared as string *2
On the first form wich opens in your code initialise it with an empty string.
Then you can use it instead of vbTab
Code:
If Question = Incomplete Then
AnswerNextOne
Else
ReplyIfKnown
End If
cu Swatty
-
Oct 7th, 2002, 06:09 AM
#3
Thread Starter
Hyperactive Member
sorry swatty....
what u said will create 2 spaces. i want something like vbtab u can see that vb tab is one character only. where as what u have said will return the length as 2 chars.
thanx
-
Oct 7th, 2002, 06:17 AM
#4
Fanatic Member
i don't think you can. like you said, tab is one character. it's like saying "can i make the A character a B character". in the VB IDE it looks like they just intercept the tab key press and use however many spaces you tell it to in the options dialog.
-
Oct 7th, 2002, 06:25 AM
#5
Thread Starter
Hyperactive Member
as swatty said, is there any way to create my own tabspace. it should behave same as vbtab but the no. of spaces should be 2 only. and the length of if should be one.
thanx
-
Oct 7th, 2002, 07:02 AM
#6
vbTab corresponds with ASCII character 9. It depends on the program you use to view the text with, how it will be displayed.
-
Oct 9th, 2002, 05:50 AM
#7
Frenzied Member
If you type the following in your immidiate pane you'll see some differences concerning the vbTab constant.
Like Frans C mentioned it corresponds to the ASCII character 9.
Like you mentioned it has a length of 1
but try this in the immidiate pane
VB Code:
m = vbtab ' enter
?m ' enter
' you'll see it jumps two lines further if you then use the left arrow button , you see it has as much items in it as the value
'of Tab with in the Tools-> Options -> editor page
' you can check the len of it it will always be one
?len(vbtab)
If you use a string of 2 chars like i said and NOT initialize it with an empty string , the length will be 2 but if you test it against a string " " (two spaces) it will not be equal.
Code:
If Question = Incomplete Then
AnswerNextOne
Else
ReplyIfKnown
End If
cu Swatty
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|