H
Hank Youngerman
I have a UserForm with two listboxes on it. Each listbox is populated
with about 4-8 numbers of 2 or 3 digits. Each listbox is wide enough
for about 4 numbers, and high enough for two rows.
When I load the form, the boxes appear with both horizontal and
vertical scroll bars, and I can see two numbers in the boxes, one on
top of the other. The two-digit numbers appear fine, but the
three-digit numbers are aligned such that the right-most number is
partially cut off. For both boxes, the TextAlign property is set to
fmTextAlignLeft. If I change the TextAlign property (to center or
right) the contents disappear, and I have to scroll to the right to see
it.
I populate the boxes with the additem method, specifically:
UserForm1.Radius.AddItem 8
UserForm1.Radius.AddItem 10
UserForm1.Radius.AddItem 100
What appears to be happening is that the control interprets these as
being about 8-10 characters wide. If I widen the listboxes, the scroll
bars go away. But none of the values are greater than 3 digits.
So my first question is, how do I get the listboxes to recognize that
these are just 3-digit numbers, and get it to accomodate a narrow
listbox without scroll bars?
With regard to vertical appearance, I want it to be something like a
dropdown box. What I have now is more like a text window with vertical
scroll bars. Am I just using the wrong kind of control for this?
with about 4-8 numbers of 2 or 3 digits. Each listbox is wide enough
for about 4 numbers, and high enough for two rows.
When I load the form, the boxes appear with both horizontal and
vertical scroll bars, and I can see two numbers in the boxes, one on
top of the other. The two-digit numbers appear fine, but the
three-digit numbers are aligned such that the right-most number is
partially cut off. For both boxes, the TextAlign property is set to
fmTextAlignLeft. If I change the TextAlign property (to center or
right) the contents disappear, and I have to scroll to the right to see
it.
I populate the boxes with the additem method, specifically:
UserForm1.Radius.AddItem 8
UserForm1.Radius.AddItem 10
UserForm1.Radius.AddItem 100
What appears to be happening is that the control interprets these as
being about 8-10 characters wide. If I widen the listboxes, the scroll
bars go away. But none of the values are greater than 3 digits.
So my first question is, how do I get the listboxes to recognize that
these are just 3-digit numbers, and get it to accomodate a narrow
listbox without scroll bars?
With regard to vertical appearance, I want it to be something like a
dropdown box. What I have now is more like a text window with vertical
scroll bars. Am I just using the wrong kind of control for this?