Is it possible to deactivate SplitterBar in WinGrid by setting any property? In some cases after setting up some properties and rebuild solution the splitter bar are added automatically to my UltraWinGrid (i manually define a schema at runtime: generic list of wrappr class). I hadn't found any property like HideSplitterbar.
Any ideas?
Thanks!
If you mean the ColumnScrollRegion and RowScrollRegion splitters I am not sure you can hide them but you can set MaxColScrollRegions and MaxRowScrollRegions to 1 which will limit the number of scroll regions.
I have a grid on which MaxColScrollRegions and MaxRowScrollRegions are both set to 1 (via the grid designer when I unchecked a couple of checkboxes). However, at runtime I still get an extra unwanted ColScrollRegion. In the InitializeLayout event, the extra scroll region is already there. Upon further inspection, the designer-generated code is indeed creating two scroll regions.
How do I indicate in the designer (which already shows MaxColScrollRegions == 1) that I do not want the extra scroll region?
Thanks
Something in your code must be creating another scroll region.
One way this might happen is if your application is loading a layout into the grid.
Another possibility is that the designer code has somehow become corrupted. Try doing a search in your project for ScrollRegion and see if there are multiple regions being created by the form designer-generated code.
Hi.
I have the same to, and it seams to come when i leave the Designer Dialog, and it adds one more everytime i am getting out og the Desiger if i dont move theme.
I have seen this, myself. Unfortunately, all I have ever seen are the results - project in which the form has already become corrupt and the designer code is already adding an erroneous ScrollRegion. Without knowing how this occurred in the first place, though, there's no way to prevent it from happening.
I have been having this problem too.
I have a wingrid on the form that is docked to fill. When the form is maximized on a screen that is larger than the application was designed on, the splitter bar appears.
I used the ScrollRegion search idea you presented earlier. In the Windows Form Design code I have the following:
Me.UltraGrid1.DisplayLayout.MaxColScrollRegions = 1
Me.UltraGrid1.DisplayLayout.MaxRowScrollRegions = 1
Further down I have this:
RowScrollRegion1.ScrollPosition = 0
RowScrollRegion2.ScrollPosition = 0
Me.UltraGrid1.DisplayLayout.RowScrollRegions.Add(RowScrollRegion1)
Me.UltraGrid1.DisplayLayout.RowScrollRegions.Add(RowScrollRegion2)
When I comment out the "Add(RowScrollRegion2)" line the splitter bar does not appear when the form and grid are maximized. Uncommenting brings the splitter back.
Roger
Hi Roger,
You probably want to find the definition of RowScrollRegion2 and delete it and any references to it just to keep things clean. There's no reason for that variable to exist or ever be referenced or use up any memory.
I've got a bit of an update on this as I've also experienced this issue.
We had a number of instances where we would open a form containing a grid in design-mode, close it, re-open it again and another scroll region would have been created. This would continue until there were at least 10 row and 10 column scroll regions, at which point it would stop and not get any worse.
After examining the designer for the form, I noticed that loads of the following entries were being created, one on each close and re-open of the form containing the grid:
Me.grdTemplates.DisplayLayout.ColScrollRegions.Add(ColScrollRegion1) Me.grdTemplates.DisplayLayout.ColScrollRegions.Add(ColScrollRegion2) Me.grdTemplates.DisplayLayout.ColScrollRegions.Add(ColScrollRegion3) Me.grdTemplates.DisplayLayout.ColScrollRegions.Add(ColScrollRegion4)
I commented these out and the problem has gone away and hasn't re-occurred.
Does this shed any further light on the problem?