I have a setup as follows:
The nested tab control in tabPage2 is populated at run-time (starts with no tabs) via either the Load button or the Load menu item. When a file is loaded, a user control which contains a two tab tab control with a DataGridView on each tab is added to a new tab page (in the picture, this would be tabPage3 or tabPage4) which is then added to the tab control on tabPage2.
I have noticed that when you load the same file from the Load button while on tabPage2, and then from the Load menu item while tabPage2 is not selected, the column widths of the DataGridView are slightly different despite both loads running the exact same code. If you click between the tabs, you can visibly see the columns 'shuffle' for lack of a better word, despite them having the exact same data set and being on DataGridViewAutoSizeColumnMode.Fill.
Is there something at play here that I'm not aware of that a control that is visible when added is treated differently to a control that is not visible when added?
Aucun commentaire:
Enregistrer un commentaire