Quick Tip: Creating a Splitter control between panes of a window with Dexterity
For many years Dexterity developers have wanted to be able to add a splitter control to windows with "panes" created with lists, treeviews or listviews.
Using the window Object property Resizeable set to True-Per Field, developers have created windows which can be resized but the join between the panes has been fixed as either Stay Left, Stay Centered, or Stay Right.
The issue is that as the window size grows, the position of the join between the panes means that usually one pane on the window is of a less than optimal size.
The best example of this is the SmartList window where the left hand treeview pane grows much bigger than it needs to be and wastes a large amount of screen real estate. This screen real estate would be much better used by adding it to the right hand listview pane.
I knew that back in version 8.0, List windows were added to Microsoft Dynamics GP. These windows had fields in the a scrolling window which could be resized using a Splitter control. This Splitter control was created in Dexterity using a 1 pixel wide push button. For more information on the history and the Splitter control, see Pat's article: Smartlist: Splitter control in Smartlist window doesn't work.
Disclaimer: It is important to note that the Splitter control is untested, undocumented and unsupported. Use at your own risk. It also will not work with the upcoming Dynamics GP 2013 Web Client.
So last weekend, I decided to experiment with this control and add Splitter controls to the appropriate windows in the next build of the Support Debugging Tool.
To make the Splitter control work, you need three controls, one fixed on the left edge, one fixed on the right edge and a movable one in the middle where the panes join.
Below are the properties you need to set up the Splitter control for a two pane window (I have highlighted differences between the 3 splitters after setting properties based on the left splitter):
Left Splitter
Using global field FieldSplitter[1]:
Tab Property Value Object Editable False Hyperspace True Tabstop False Visual Appearance 3D Highlight Position-Left Left Edge of Left Pane Position-Top Top Edge of Left Pane Resize-Horizontal Stay Left Resize-Vertical Grow Size-Height Height of Left Pane Size-Width 1 Visible False
Middle Splitter
Using global field FieldSplitter[2]:
Tab Property Value Object Editable True Hyperspace True Tabstop False Visual Appearance 3D Highlight Position-Left Left Edge of Right Pane less Size-Width Position-Top Top Edge of Left Pane Resize-Horizontal Stay Centered Resize-Vertical Grow Size-Height Height of Left Pane Size-Width Width of space between Panes Visible True
Right Splitter
Using global field FieldSplitter[3]:
Tab Property Value Object Editable False Hyperspace True Tabstop False Visual Appearance 3D Highlight Position-Left Right Edge of Right Pane Position-Top Top Edge of Left Pane Resize-Horizontal Stay Right Resize-Vertical Grow Size-Height Height of Left Pane Size-Width 1 Visible False
To make sure the Splitter control works properly, make sure that the edges of the push button are adjacent to the controls you want to resize.
Check out the follow up post where I show how I used this concept to add a Splitter Control to the SmartList window using the Support Debugging Tool and Non-Logging Triggers.
Note: The link above will work once the post is published.
David
Comments
Anonymous
December 02, 2012
Cool article and cool feature too!! Great post.Anonymous
December 05, 2012
Posting from Mark Polino at DynamicAccounting.net msdynamicsgp.blogspot.com/.../quick-tip-creating-splitter-control.htmlAnonymous
April 08, 2016
This is a superb postAnonymous
April 08, 2016
Hi MistiLet me know if you get it working. Note it does not work for the web client.David