lunedì 14 marzo 2011 01:41
I use TableLayoutPanels a lot to implement resizing in my winforms projects.
I've noticed that quite often the form will immediately mark itself as "modified" once I load it in the IDE.
Looking at the .Designer.vb file, it seems to change the decrement location X-value of some controls anchored inside the TableLayoutPanel by a single pixel each time I save.
Is there a way to avoid this? It's generating a lot of noise in our version control system.
Tutte le risposte
lunedì 14 marzo 2011 09:14Moderatore
Would you please give steps or a simple demo to reproduce the problem?
Looking forward to your update.
Helen Zhou [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
venerdì 18 marzo 2011 06:25It only seems to occur when you put enough rows and columns on a TLP ... the exact amount of rows, columns, and contained controls is hard to work out. I will try to work out the steps and post it here.
mercoledì 23 marzo 2011 09:51Moderatore
lunedì 28 marzo 2011 14:29
I have observed this too, it's happened to me a lot. I didn't mind (I don't use version control software) so I never tried to figure out why and when not. I also use TableLayoutPanels a lot, so it could be it, although I never investigated. I only noticed VS marked the file (tab) as modified after simply opening it, I didn't track whatever change it was.
So I only wanted to report that I get this bug too, even if I don't mind that much.
lunedì 11 luglio 2011 08:34
I've had similar problems in VS2010. We use TFS and "Prompt for checkout" on edit. Every time I opened the designer of one of our forms, I got harassed by TFS, asking me to check out the form. So I decided to isolate the problem. It's behaviour is quite similar to what David described in his first post.
My experience is as follows: If the height of a control with a fixed height (such as a TextBox or ComboBox) exceeds the height of the TableLayoutPanel cell it is placed in, the designer automatically seems to modify the resx-file when opening the form in design view. But when I save the files and compare them to the checked-in versions, there appear to be no changes.
- Contrassegnato come risposta David Streeter lunedì 18 luglio 2011 05:31
lunedì 18 luglio 2011 05:37
Thanks andrehoo, you nailed it.
With the lead I got from your answer, I worked out that the problem occurs when I add a list-type control (e.g. listbox or checkedlistbox) to the tablelayout panel and then set the anchor to Top+Left+Right+Bottom. the control resizes itself to be slightly too big or something. I haven't got a solution yet but at least I can now reproduce the problem and fiddle with it from time to time to get a work around.
giovedì 1 marzo 2012 01:27
I get this all the time and its extremely annoying now that we have started using source control, and i never use TableLayoutPanels.
giovedì 31 maggio 2012 08:03
I have the same problem without using TLP...some forms (I can't understand what is the control that raise that) became marked and checked out!!!
This problem became serious using TFS because you can't open designer's form without edit it!!!