Page 1 of 1

Bug in Form (code/design view)

Posted: Thu Nov 21, 2019 11:13 am
by tatanas
I just found a strange behaviour when we make code with the form designer.
I made my gui without touching anything in the code then I change the indentation format in the preferences (the 2 spaces was not enough for me).
When I get back to the generated gui code, I applyed the new indentation format and when I switched back to the form designer... nothing
So I discovered that we can't change the spaces/indentation in this code.

Is it a bug or a limitation ? Could it be fixed/improved ?

Re: Bug in Form (code/design view)

Posted: Thu Nov 21, 2019 3:26 pm
by Marc56us
I just found a strange behaviour when we make code with the form designer.
I made my gui without touching anything in the code then I change the indentation format in the preferences (the 2 spaces was not enough for me).
When I get back to the generated gui code, I applyed the new indentation format and when I switched back to the form designer... nothing
So I discovered that we can't change the spaces/indentation in this code.
Is it a bug or a limitation ? Could it be fixed/improved ?
This is not a bug, this is the normal behavior of the Form Designer.
The source code is only the saving of the state of the objects at runtime. It is therefore rewritten in its entirety each time you press F5 (like JSON data files, XML)
All manual changes are therefore ignored (Indentation, order, comment)
The only changes that will be kept are the numerical values and the content of the character strings.

:wink:

Re: Bug in Form (code/design view)

Posted: Thu Nov 21, 2019 3:57 pm
by tatanas
Yep I read that. But I thought indentation would not be a problem.

Re: Bug in Form (code/design view)

Posted: Tue Nov 26, 2019 1:21 pm
by Fred
It's the expected behaviour, we don't plan to keep user formatting in this generated output