[CONNECT C++] Listbox Sizable Column Headers

I am implementing a listbox with sizable columns and have ran into the following issue:

The listbox sizes without consideration for the dialogs extents:

Default (before sizing):

When decreasing size:

When increasing size:

This occurs with or without the extended attribute to allow last column to resize

 extendedIntAttributes
    {{{EXTINTATTR_ITEMATTRS, LISTATTRX_USERRESIZELASTCOL}}
};

Anyone know how to fix this?

Parents
  • Some time ago, but I had the same problem and the solution is quite simple. This happens when the width of the listbox is set to 0 in the dialog box definition, which means that the width is determined by the column widths, like so:

        {{X1,    Y6,  0, 0}, ListBox,    LISTBOXID_CMT_One,        ON, TEXT_MASK_LABELABOVE | LABEL_FONT_BOLD, "One mapping found:", ""},

    The listbox should be set to a fixed width like so:

        {{X1,    Y6, W2, 0}, ListBox,    LISTBOXID_CMT_One,        ON, TEXT_MASK_LABELABOVE | LABEL_FONT_BOLD, "One mapping found:", ""},

     Now the listbox keeps a fixed size while the columns are scaled, which is the desired behaviour.

Reply
  • Some time ago, but I had the same problem and the solution is quite simple. This happens when the width of the listbox is set to 0 in the dialog box definition, which means that the width is determined by the column widths, like so:

        {{X1,    Y6,  0, 0}, ListBox,    LISTBOXID_CMT_One,        ON, TEXT_MASK_LABELABOVE | LABEL_FONT_BOLD, "One mapping found:", ""},

    The listbox should be set to a fixed width like so:

        {{X1,    Y6, W2, 0}, ListBox,    LISTBOXID_CMT_One,        ON, TEXT_MASK_LABELABOVE | LABEL_FONT_BOLD, "One mapping found:", ""},

     Now the listbox keeps a fixed size while the columns are scaled, which is the desired behaviour.

Children
No Data