We have a tab page on a Dynamics form that has many controls on it. It
correctly offers a scrollbar so that we can navigate the controls.
While the form is displayed on screen, certain fields will be shown
(control.visible(true)) and hidden (control.visible(false)) in response to
These manipulations alter the total height of the Tab Page so should affect
the scroll bar but the scroll bar does not change. Slightly resizing the
form by hand is enough to nudge Ax into recalculating the form and the
scrollbar updates. We have run tests (very simple xpo available) and cannot
make this happen programmatically.
This is causing a problem as it is not always clear that there are more
fields that need to be entered by the user.
Regards (and optimistic thanks in advance)
p.s to reproduce this, I can supply an xpo which has the following (or
follow these instructions!) :
make a form with tab control with 1 tab page.
tab page has button and 2 string edits, display height: 5
tab and tab page have height/width set to column height/width to allow
resizing of form
add code to button to do stringEdit1.visible(!stringEdit1.visible))
Run form and experiment with clicking the button and resizing the form.
Note how the scroll bar does not stay up to date with the current height of
the visible contents of the tab page.
MathiasFuessle chimed in with hello Chris,
this is indeed a strange behavior.
The only workaround i can give you is:
After you set the visiblity of your controls try to add this peace of code
It will add 1 to the current width of the formdesign.
I hope this will help you.
my blog: http://starside.eu
ChrisRother mentioned thank you so much Mathias, you are a genius!
I can’t believe I didn’t try that! It even works when the form is maximised.
Two further revisions of this idea later and I have a very workable solution.
Firstly I thought about +1 when showing, -1 when hiding to stop it creeping
wider and wider (not that this happens more than once or twice for a run of
the form) which worked.
Secondly and the perfecto solution is to +1 then immediately -1 so the form
bounces 1 pixel wider then snaps back to its original size.