Developer Portal Community

    Showing results for 
    Search instead for 
    Did you mean: 

    Column of Mod_Grid not stretching dynamically

    Column of Mod_Grid not stretching dynamically

    Long-established Member


    This is for the HMI modulo

    I am creating a station whose HMI will be displayed on screens with different screen resolutions. On a particularly busy page I am using Mod_Panels to stretch my controls according to the space requirements. In one of those panels I am using a Mod_Grid control with a single column. I set the anchors and the control is changing its size correctly as I am resizing the window.

    But my problem is that the column inside the Mod_Grid is not changing its size, making the dynamic resizing function sort of useless for this control. It always keeps the width I set for the column in Columns collection. The documentation promises that the last column would change its width to fill the entire Mod_Grid control, but that does not seem to be the case:


    I also tried various other settings, but no matter what I do, the width is fixed. Are there any solutions to this?

    Thanks in advance.

    3 REPLIES 3

    Long-established Member

    Did you try it in single HMI form? For me it works, so maybe it has something to do with Mod_Panel.




    Long-established Member

    I tried several more things, also putting the Mod_Grid into its own view without any other smart controls. I found that I can only make it scale the last column dynamically if I do not link any column data (VWItemColumnData). As soon as I specify an array here (I tried both strings and numbers), the width will not change anymore and be fixed to the value I set. Well, this does not seem quite intentional. Did you manage to make it work _with_ data?

    Hi Marvin,

    you are right. The behaviour of the last column with connected data should be the same as if there is no data connected.

    Also it only happens if the anchor or dock property of the Mod_Grid is set. In this case it only scales until the configured width of the control is reached. 

    I will try to fix that with one of the next bugfixversions.