Advertisement
3_2004-2005 Custom Controls/ Forms/ Menus #142234

Make a dropdown bigger than its combobox **Simple**

The only code I could find for this used tons of api and was a bit difficult (at least for me) this code is only 3 lines and works well.It lets you save room on your form by making your dropdown bigger than its combobox. My use for this was as a state field on a form. The box showed the two letter abbreviation for each state, but if you dropped down the box it showed the full state name. I'm sure you will find your own uses for this

AI

Podsumowanie AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Kod źródłowy
original-source
Private Sub Form_Load()
  SendMessage cboState.hwnd, CB_SETDROPPEDWIDTH, 135, 0
'be sure to either carry the line down with a _, or put it all on one line. The complete line should start with SendMessage and end with 0
End Sub
Upload
Oryginalne komentarze (3)
Odzyskane z Wayback Machine