ListBox column width in resource file ignored

When I create an application within MicroStation, I define the dialog layouts in a resource file (.r).

A multi-column listbox is defined by means of a DItem_ListBoxRsc where each column has 4 parameters:

  • Column width
  • Max size
  • Attributes
  • Heading

It seems that since the Connect Edition, the specified column width is ignored and the application simply takes the width of each column as within a previous exection: When a manually change the column width by dragging the header left or right and then close and reopen the application, the column widths appear as within the previous run.

I can still programmatically adjust the width by calling the mdlDialog_listBoxSetColInfo API.

The previous edition (MicroStation V8i) did not act like this.

Has anyone had the same experience?

Thanks,

Robert

Parents
  • the specified column width is ignored and the application simply takes the width of each column as within a previous exection

    Probably the first time your dialog is shown the ListBox columns take their width from your resource.

    At some point, MicroStation stores its user prefs and other settings.  For example, look in C:\Users\%USERNAME%\AppData\Local\Bentley\MicroStation\10.0\prefs to find Personal.Docking.xml and other settings files.  On my computer I can see XML data like this:

    <ZoneInfo zone-id="7860ecfe-944c-483e-8f59-54a2f376e91e" last-width="1031" last-height="473" filter="0" fixed-size="False" form-x="877" form-y="36" form-width="1049" form-height="520" />

    That seems to be the default behaviour of MicroStation CONNECT.  I don't know if it's possible to disable the dialog position-saving logic.  Perhaps  can tell us?

     
    Regards, Jon Summers
    LA Solutions

  • Hi Jon,

    You're probably right that MS saves the latest widths somewhere but I don't think it's in the file you mentioned.

    I've opened many applications and the one I'm working on currently has already 5 listboxes (in 3 different dialogs) with a total of 25 columns. My file Personal.Docking.xml doesn't have that many entries.

    Anyway, for the management of a ListBox, I usually use a template class I created some time ago. I'm extending that one so the column widths can be set easily a startup.

    Thanks,

    Robert

Reply
  • Hi Jon,

    You're probably right that MS saves the latest widths somewhere but I don't think it's in the file you mentioned.

    I've opened many applications and the one I'm working on currently has already 5 listboxes (in 3 different dialogs) with a total of 25 columns. My file Personal.Docking.xml doesn't have that many entries.

    Anyway, for the management of a ListBox, I usually use a template class I created some time ago. I'm extending that one so the column widths can be set easily a startup.

    Thanks,

    Robert

Children