0

I have an FMX project with a lot of forms that have BorderStyle := bsNone set during design time, and every time I open one of these forms the IDE will increase its height by 23 pixels. I'm currently using XE5 but I had the same issue in XE2 which I have been using before.

The issue can be reproduced with a vanilla desktop project with one FMX form, but does not appear using VCL.

DNR
  • 1,619
  • 2
  • 14
  • 22

2 Answers2

1

This is fixed in XE6.

As a workaround you could try setting the BorderStyle at runtime.

Sebastian Z
  • 4,520
  • 1
  • 15
  • 30
0

I'm more familiar with older versions of Delphi and don't have XE2 installed, but as a workaround can you set Constraints.MaxHeight := [designtime height] and see if that prevents the behavior you are seeing?

Mark Wilsdorf
  • 751
  • 1
  • 5
  • 18
  • Unfortunately firemonkey forms don't have a Constraints property. Another question (http://stackoverflow.com/questions/8031685/how-to-restrict-minimum-forms-width-in-firemonkey) offers a solution to that problem by deriving a class and adding Constraints, but while I did not test whether this would solve my problem it seems like kind of an overkill ... – DNR Jul 30 '14 at 11:34
  • Also, it is possible that the forms will be resized at runtime. It's just annoying to always either discard all those changes or to check random changes to random files into version control. – DNR Jul 30 '14 at 11:36
  • I realized FMX _might_ not have a Constraints property, but thought I should at least mention the possibility. Seems like runtime resizing wouldn't be a big problem. Is there any time early in instancing the form that you can get ahold of the designtime Height, save it to another variable, then apply it to the Height property later once the form is instanced/showing? That would make make the resizing correction automatic. – Mark Wilsdorf Jul 30 '14 at 15:32
  • I don't think there's a way to automatically correct the height before the application is actually launched, which I would have to do in order to work around the problem ... – DNR Jul 31 '14 at 06:07
  • @Mark perhaps this should be a comment rather than an answer – David Heffernan Aug 01 '14 at 06:17
  • @David...yes, probably so. – Mark Wilsdorf Aug 01 '14 at 11:00