PDA

Click to See Complete Forum and Search --> : Resizing Listboxes


Dan-
Nov 15th, 1999, 03:42 PM
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
danielrose@subdimension.com

dmuir
Nov 15th, 1999, 10:53 PM
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 (http://www.vbextrax.com)

dmuir
Nov 15th, 1999, 10:54 PM
Sorry, I spelled the site wrong. It is www.vbextras.com (http://www.vbextras.com)

Aaron Young
Nov 16th, 1999, 11:53 AM
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.

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
aarony@redwingsoftware.com
adyoung@win.bright.net