|
-
June 15th, 2000, 06:33 AM
#1
How can I get the height of my text boxes and listboxes to match?
Hello -
Can anybody help me match the heights of my list boxes and text boxes?
I am a form which dynamically loads up a combination of 20 user controls at run time. Each user control is a strip with a label, a checkbox and either a list box or a text box (of varying lengths).
When the various user controls get loaded onto the form -the text boxes have more height than the list box in other user controls. The height of all text boxes is 285 and the height of the list box is 255 - however -I can't change the height property of the list box to 285.
Does anyone know of a way to do this or tell me why I can't- or can you suggest a strategy for making all text boxes and list boxes have an equal height.
Thanks very much.
Mairi
-
June 15th, 2000, 06:37 AM
#2
Re: How can I get the height of my text boxes and listboxes to match?
if I remember correctly you have to set the windows style of your listbox to LBS_NOINTEGRALHEIGHT.
From the docs:
"The size of the list box is exactly the size specified by the application when it created the list box. Usually, Windows sizes a list box so that the list box does not display partial items."
use the SetwindowLong API to set the window style.
-
June 15th, 2000, 06:45 AM
#3
Re: How can I get the height of my text boxes and listboxes to match?
... Or you can just set the 'IntegralHeight' property to false 
Chris Eastwood
CodeGuru - the website for developers
http://codeguru.developer.com/vb
-
June 15th, 2000, 06:47 AM
#4
Re: How can I get the height of my text boxes and listboxes to match?
...just found it.
still mentally stuck in VB 3 world... :-)
-
June 16th, 2000, 02:12 AM
#5
Re: How can I get the height of my text boxes and listboxes to match?
Thank you very much for taking the time to respond - this was just what I was after!
Regards,
Mairi
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|