Results 1 to 7 of 7

Thread: set the tab space

  1. #1

    Thread Starter
    Hyperactive Member ravi15481's Avatar
    Join Date
    Aug 2002
    Location
    INDIA
    Posts
    421

    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,
    A good friend...

  2. #2
    Frenzied Member swatty's Avatar
    Join Date
    Aug 2002
    Location
    somewhere on earth
    Posts
    1,478
    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

  3. #3

    Thread Starter
    Hyperactive Member ravi15481's Avatar
    Join Date
    Aug 2002
    Location
    INDIA
    Posts
    421
    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
    A good friend...

  4. #4
    Fanatic Member
    Join Date
    Apr 2002
    Posts
    638
    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.

  5. #5

    Thread Starter
    Hyperactive Member ravi15481's Avatar
    Join Date
    Aug 2002
    Location
    INDIA
    Posts
    421
    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
    A good friend...

  6. #6
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926
    vbTab corresponds with ASCII character 9. It depends on the program you use to view the text with, how it will be displayed.

  7. #7
    Frenzied Member swatty's Avatar
    Join Date
    Aug 2002
    Location
    somewhere on earth
    Posts
    1,478
    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:
    1. m = vbtab              ' enter
    2. ?m                          ' enter
    3.    ' 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
    4. 'of Tab with in the Tools-> Options -> editor page
    5. ' you can check the len of it it will always be one
    6. ?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
  •  



Click Here to Expand Forum to Full Width