Exceptions at startup Office 2019 App

Dear TMS-Team,

I installed the recent update for TMS VCL UI Pack and noticed several exceptions during startup of my app. The app was working without any issue before this update, so I investigated in your code.

First I found in TAdvToolBarPager.UpdateCaptionButtons the assignment "bmp.Height := h - 2;" fails as h=0 leading to negative height.

I traced back over several steps to the root cause of this issue and finally found in TAdvToolBarPager.Loaded the value Caption.Height in the second line is zero which causes the mentioned trouble in the software. I tried to reproduce this issue with a new clean code by creating a new Office 2019 App.

By doing so I found the initial value of Caption.Height when creating a new app is set to 27, the default value is DEFAULT_PAGERCAPTIONHEIGHT96DPI =26. In my app the default value 26 was adjusted, maybe based on the time before the update. It sounds ridiculous, but this makes the difference. If Caption.Height is set to 26 at designtime and additionally a non empty string is added to Caption.Caption the startup fails due to Caption.Height is zero at TAdvToolBarPager.Loaded.

You can easily reproduce this by creating a new Office 2019 App, setting Caption.Height to 26 and assign a non empty string to Caption.Caption.

The solution for me was to set Caption.Height to any value except 26, doing so everythings works as desired. I post this in the forum, maybe it will help other customers with the same issue to get faster to the solution than me.

Please fix this issue in the next update.

Best regards
Wolfgang Häfele

Hello Mr Häfele,

Thank you for letting us know, we fixed this immediately.
This fix will be included in the next update.

We're sorry for this inconvenience.