locked
Combo box needs to display two columns when expanded but only show one when closed RRS feed

  • Question

  • My combobox picks from a table with three fields: ID, CriteriaValue, CriteriaRationale.

    CriteriaValue is a decimal number (0, 0.1, 0.2...1.0)

    CriteriaRationale is the default explanation (sentence) that corresponds to why the CriteriaValue was chosen. I only need to display the CriteriaValue.

    My form is very cramped so I can only allow 1" for CriteriaValue. But in order to choose the CriteriaValue the user needs to see the CriteriaRationale. With the width being 1", the user can't see the entire CriteriaRationale during the dropdown event, even when using the scrollbars.

    So...is there a way to have the combobox display both CriteriaValue and CriteriaRationale (roughly 5" width for both fields) during the drop down event but display only the CriteriaValue in the 1" box when the value is selected?

    TY

    Thursday, April 5, 2018 2:29 PM

Answers

  • Set the ListWidth property of the combo box to 5", and the Column Widths property to 1";4" if the row source consists of CriteriaValue and CriteriaRationale, or to 0";1";4" if the row source consists of ID, CriteriaValue and CriteriaRationale.

    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    • Marked as answer by gravesgrg Thursday, April 5, 2018 2:50 PM
    Thursday, April 5, 2018 2:35 PM

All replies

  • Set the ListWidth property of the combo box to 5", and the Column Widths property to 1";4" if the row source consists of CriteriaValue and CriteriaRationale, or to 0";1";4" if the row source consists of ID, CriteriaValue and CriteriaRationale.

    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    • Marked as answer by gravesgrg Thursday, April 5, 2018 2:50 PM
    Thursday, April 5, 2018 2:35 PM
  • Thanks. Had the ListWidth set to Auto. Would have thought that "Auto" would adjust for widest entry.
    Thursday, April 5, 2018 2:51 PM