Results 1 to 2 of 2

Thread: Solid tabs

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2000
    Posts
    7
    How I can set solid tab with Printer object? Or How I can set solid tabs in Listbox Control, chr(9) is not very useful to my project.
    Jani T

  2. #2
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>...this any help?

    Code:
    'set tab stops in a listbox
    'appears as columns
    '
    Option Explicit
    '
    Public Declare Function SendMessageArray Lib _
       "user32" Alias "SendMessageA" _
         (ByVal hwnd As Long, _
            ByVal wMsg As Long, _
               ByVal wParam As Long, _
                  lParam As Any) As Long
    
    Public Const LB_SETTABSTOPS = &H192
    
    '<<<<< code for form >>>>>
    '
    Private Sub Command1_Click()
        
        List1.AddItem "Nothing More"
        List1.AddItem "Nothing Less"
        List1.AddItem "Just A Sample"
        
        Dim r As Long
        
        'set up the tabstops in the listboxes
        ReDim TabStop(1 To 3) As Long
        
        'assign values to the tabs for the second third and fourth
        'column (the first is flush against the listbox edge ie...0)
        TabStop(1) = 80
        TabStop(2) = 160
        TabStop(3) = 240
        
        'set the tabs
        r = SendMessageArray(List1.hwnd, LB_SETTABSTOPS, 3, TabStop(1))
        List1.Refresh
        List1.AddItem "...A lesson" & vbTab & "in creating" & vbTab & "columns" & vbTab & "in a listbox!"
        
        
    End Sub
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

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