I also needed to refine some of the code so I could reduce the window down a little further without everything going south. So what I decided to do was take a look at the problem afresh – it’s been a wee while since I looked at the code and I was definitely in the situation of can’t see the forest for the trees.

So what I present below is the ‘feature’ complete 😉 version that I am rolling out to my forklift users.

Instead of fudging everything and competing against the modification and getting horribly messed up when the ContainerPanel reaches its minimum size, we now check the size of the ContainerPanel Grid, this is the Grid upon which things like the Inquiry Type are attached.

Through some trial and error I found the minimum size that we get to before we get scroll bars (yes, I know, I should have just looked at the minimum size, but our modification seemed to be doing some odd things – or maybe it was the hour :-)). So, when we hit this magic height where the scrollbars appear, we change our resizing logic.

We also look at the information that Lawson provide in their jscript guide and some of our Row settings are now hardcoded.

Whenever the size of the ContainerPanel Grid changes we fire an event. This event will then resize our ListView and move the controls under that ListView based upon the new size offset against the ‘magic height’.

The code will also only apply when we are set to Inquiry Type 9 (this is our modified screen).

The raw code I am about to post won’t really work for anyone but us, but hopefully some of the functions and concepts will be useful.

This particular challenge has been rather good for me, its opened my eyes a little more and I hope illustrates and emphasises that this is a journey of discovery for me 🙂 so what I do may make the poor developers at Lawson cringe but hey… 🙂