musclecarlover07
Registered User.
- Local time
- Today, 12:05
- Joined
- May 4, 2012
- Messages
- 236
So how would I go about changing the width of a combo box to the length of the value in vba?
Me.myComboBox.width = xxxx
For you it is annoying but for other users I'm sure they won't mind. In fact most well-built applications don't implement this behaviour.Its OCD kicking in. I have 12 items in the dropdown box and the shortest selection is 10 characters then the longest selection is 20+ characters. When I select something that is smaller then there is all this empty space and its annoying to see. So if I could fix that it would be awesome.
I've made a small example for you in the attached database, open the only form and choose a text in the combobox.Ok. Well If it is possible I still would like to have it.
You're right, it doesn't matter!... but it won't matter in this case.
Well I agree. I think JHB has done really well to come up with what you wanted. But I hate it. I particularly dislike that if you choose a short word by mistake it can be difficult to then find the correct selection when you can only see the first two or three letters. As a user, I think I would much prefer a static combo box.Thanks JHB. That works really nicely.
I particularly dislike that if you choose a short word by mistake it can be difficult to then find the correct selection when you can only see the first two or three letters. As a user, I think I would much prefer a static combo box.
Well I suppose it's true when they say that, "Beauty is in the eye of the beholder" and "One mans meat is another mans poison". I hope you will forgive me if I decline any offer in the future of dinner and a blind date.Ok to fix that I changed the list width to be the same size as the longest choice. This way no matter what I choose the list width is always the same size.
I love this because I like the design of a project. When I see a field with a bunch of empty space it bothers be and ruins the overall design. Everything has a specific place. Evey thing has to be the same distance from each other. Design is everything. The first thing to an app a db etc they see is the design. If it is appealing they will be more likely to use it. This is my belief and it hasn't let me down yet.