Results 1 to 4 of 4

Thread: Resizing Listboxes

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 1999
    Location
    Brisbane QLD AU
    Posts
    5

    Post

    I cannot manage to resize a listbox in the code to any particular size. It only allows me to resize it to whole lines. Any ideas on how to get rid of this restriction?

    ------------------
    Daniel Rose
    [email protected]

  2. #2
    Junior Member
    Join Date
    Nov 1999
    Location
    Wellsburg, WV, USA
    Posts
    25

    Post

    You may want to just change the font size according to the resize of the list box. If you use a smaller size font, you will be able to have more control on the height of the control. You might also want to try Larcom & Youngs Resize.ocx from www.vbextrax.com

  3. #3
    Junior Member
    Join Date
    Nov 1999
    Location
    Wellsburg, WV, USA
    Posts
    25

    Post

    Sorry, I spelled the site wrong. It is www.vbextras.com

  4. #4
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177

    Post

    Set the Listboxes IntegralHeight property to False and it will allow you to set the Height to any Value without Rounding it to the Nearest Full Character Height, eg.
    Code:
    Private Sub Command1_Click()
        List1.Height = Rnd * (ScaleHeight - 200)
    End Sub
    
    Private Sub Form_Load()
        Dim I As Integer
        List1.Move 0, 0
        Randomize Timer
        For I = 1 To 100
            List1.AddItem "Item " & I
        Next
    End Sub

    ------------------
    Aaron Young
    Analyst Programmer
    [email protected]
    [email protected]

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