Column of Mod_Grid not stretching dynamically
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2022 07:37 AM
Hello,
This is for the HMI modulo 4.11.5.0.
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2022 02:57 PM
Did you try it in single HMI form? For me it works, so maybe it has something to do with Mod_Panel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2022 06:59 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2022 12:17 PM
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.