etienne_marais
Honorary Master
- Joined
- Mar 16, 2008
- Messages
- 15,093
Working on a large legacy Winforms app. in VS2015
On a form I have a table with 4 columns, each column set to 25% width and each of the four columns containing it's own table. So I add controls to the 4 tables hoping for a neat alignment. The columns within the individual 4 tables are set to autosize with the controls within them docked to fill. To make a long story short, the rendering is unpredictable and apparently tied to a sequence of steps:
When I decided to use autosize for the controls within the columns of each of the 4 individual tables the following happens:
1) Change columns to autosize then run the project. Rendering is wrong, the length of the columns stay fixed.
2) Stop the debugging session and change the columns back to fixed width. Run the project with fixed length columns. Stop the project and change the columns back to autosize. Run the project again. Rendering is closer to what was expected (stretched to fit screen).
3) Check that I am not going mad: change the columns to fixed WITHOUT running the project. Change the columns to autosize again. Run the project and the rendering is wrong again with fixed length rendering of the columns.
Repeat these steps a couple of times for control and it indeed seems the rendering is dependent on me running the project first while the columns are fixed-length, i.e. it can't be fixed length and then changed to autosize WITHOUT running the project first with the fixed length columns.
I am using Janus controls thought, so it may be a flaw of theirs rather than Microsoft (?)
On a form I have a table with 4 columns, each column set to 25% width and each of the four columns containing it's own table. So I add controls to the 4 tables hoping for a neat alignment. The columns within the individual 4 tables are set to autosize with the controls within them docked to fill. To make a long story short, the rendering is unpredictable and apparently tied to a sequence of steps:
When I decided to use autosize for the controls within the columns of each of the 4 individual tables the following happens:
1) Change columns to autosize then run the project. Rendering is wrong, the length of the columns stay fixed.
2) Stop the debugging session and change the columns back to fixed width. Run the project with fixed length columns. Stop the project and change the columns back to autosize. Run the project again. Rendering is closer to what was expected (stretched to fit screen).
3) Check that I am not going mad: change the columns to fixed WITHOUT running the project. Change the columns to autosize again. Run the project and the rendering is wrong again with fixed length rendering of the columns.
Repeat these steps a couple of times for control and it indeed seems the rendering is dependent on me running the project first while the columns are fixed-length, i.e. it can't be fixed length and then changed to autosize WITHOUT running the project first with the fixed length columns.
I am using Janus controls thought, so it may be a flaw of theirs rather than Microsoft (?)