Last week, I enumerated several questions that I've been asked and have seen posted to the public Dynamics GP newsgroups. These questions are typically of the "Why doesn't Smartlist..?" variety.
In this post and a few planned future posts, I'll look at each of these questions individually and give a few thoughts around them and maybe a few solutions as well.
Getting to it, the question today is:
Why doesn't the splitter control between the Smartlist object & favorites panel and the data panel work?
Because there isn't one. The black line you see is merely the treeview control (the left control) and the listview control (the control on the right where data shows) touching each other. Another good reason is because Dexterity doesn't offer a "splitter" control in its toolbox.
Or does it?
For one of the proposed features of 8.0, there was a need to be able to have resizeable columns in a Dexterity scrolling window. To support the proposed feature, a "stealth" splitter control was created by Dexterity development.
The reason I say "stealth" is because:
This is an undocumented feature
Only intended to work in a one line scrolling window
There isn't a physical control on the toolbox specifically for a splitter control
So what is the trick?
The trick is that in Dexterity or Modifier, a splitter control is - essentially - a skinny button. From the toolbox, make an ordinary button. But reduce its width to 1 or 2 pixels. In design mode it is just a skinny button. But in runtime or if you choose to preview the window and you hover your mouse over the control it will turn into a <--|--> shape which is the grab handles of the typical splitter control!
Moving left and right should resize the fields next to it larger and smaller as long as the field top & bottom are at least the top & bottom coordinates of the fields next to it.
So could we leverage this newly discovered splitter control in our Smartlist window?
Unfortunately I don't think so. Or at least not that I've been able to make work very well.
As I noted previously, this control was meant for a one line scrolling window. And scrolling windows:
Do not have treeview controls
Do not have listview controls
Scrolling windows do not "resize"
Every few months for the last couple years I think "I should be able to make this work" and give it a try as I think I must have missed something or must be a little wiser now. Wiser is up for debate but I don't think I missed anything - it is just the limitations of the planned functionality of this splitter control.
If you make your skinny button splitter control and add it to the Smartlist window between ASI_TreeExplorerView and ASI_ExplorerListView and choose Layout | Preview, you'll note that it seems to sort of work. However if you manually resize the window things go haywire and the different controls do not draw correctly. The string field '(L) ObjectString' seems to mostly work but then again a string field is typical for a scrolling window and is likely to work the best of the 3 fields. I noted also that if I moved the splitter back and forth things start to not redraw correctly either. So a noble and good idea which seems doomed to failure.
So as I re-tried this yet again writing this blog article (and failing to make it work right), I'll leave it up to the readership to try it if they want to give it a shot.
Where else in Dynamics GP would this be useful? You might think some entry windows or perhaps distribution windows but really I don't see that as horribly useful. If you are going to go through the effort of modifying the window to fit your account number or fields, you'll just set them to the size as you require at that time. In essence, with this post I give you a feature that - while cool on the surface - isn't that useful in "real life". That is probably why it remains undocumented.
Now if this splitter control would ever be fixed to work on main windows then yes; I can see a lot of uses for it. But until then- I don't see it being used much.
If anyone gives the Smartlist "splitter" a go and makes it really work back and forth and resizing the window, or if you think it would be useful in any other GP windows, post a comment.
Note: As this splitter control is completely undocumented, it is also completely unsupported. We haven't heard of it crashing your system or anything like that but might not work right either - even in a scrolling window. You are on your own with this feature.