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]
Printable View
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]
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
Sorry, I spelled the site wrong. It is www.vbextras.com
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]