I am writing a touchscreen application, so I need to have the width of the UltraWinGrid scrollbar to be fairly large.
Can anyone tell me the property that will increase the width of the scrollbar? All those I've tried don't seem to do the trick.
Thanks
There's no property on the grid (or any control that I know of) for the width of the scrollbar. The scrollbar width is a Windows system setting.
Hi Mike,
do you happen to know which one that would be. I looking already for some time and I can't figure it out. I'm too looking for exactly what the OP is looking for . . . enlarging the scrollbar (vertical) in the IG Ultragrid for a touchscreen apps we have here.
TIA,
Peter
Hi Peter,
Well... what exactly are you looking for?
If you just want to get the scrollbar width in DotNet, you can use the SystemMetrics class, It think.
But if you are trying to change the width, then you can't do that with managed code as far as I know.
By "system setting", I mean that this is a setting in Windows. To change it, you have to go into your system display settings. It's controlled by the operating system. I guess there is probably some Windows API to set the scrollbar width or other system metrics, but it's probably not a good idea for any single application to be changing these settings, since they affect the entire OS, not just the application. Maybe that's okay if you are creating an application for a machine dedicated to a single touch-screen application, though. But I'm not sure off the top of my head which API you would use.
we are having the axact same problem: our application is using the Infragistics WinGrid and it must be customized for a touchscreen.
If modifying the system settings for the scrollbar width is not an option, is there a way to use custom scrollbar controls with the WinGrid?
Thanks in advance
Michael
Hi Michael,
If the system your application will run on is using a touch-screen, then it seems to me that the system settings should probably be set to have bigger scrollbars. No?
You can turn off the scrollbars in the grid and try to implement your own, but it's very tricky. Just determining the bounds of the scrollbars would mean you would have to count the number of visible rows. If you are just displaying flat data (no child bands), then this is fairly simple, you just use grid.Rows.Count. But if you have child bands it becomes more complex as you have to take into account the child rows only under expanded parents.
Once you determine the number of rows in the grid, then it's pretty simple. You set your scrollbar bounds from 0 to the row count and then when the scrollbar value changes, you set grid.ActiveRowScrollRegion.FirstRow to the row with the appropriate index.
unfortunately we are not allowed to modify the system settings.
I derived from the sources that UltraGrid already seems to use its own scrollbars (UltraScrollBar) and that these scrollbars can be configured to use the system settings (SystemInformation.VerticalScrollBarWidth, SystemInformation.HorizontalScrollBarHeight) or not. Actually in UltraGrid they use the system settings.
So I think it should be possible to set the scrollbar's AutoSize-properties to false and set individual values for their Width- and Height-properties respectively, if we only manage to gain access to the scrollbars actually used by the grid. Right?
Is there a way to get access to the scrollbars of the grid?
I realize I'm responding quite late to the game on this one, but just came across it on Google when searching for something else.
We tried a few different approaches on grid scrollbars on a touchscreen interface. Originally we altered the Windows settings, but the bar became pixelated. Then we used the UltraScrollBar and did a bunch of custom coding. That was better, but we still weren't truly happy with the results. Finally, we went back to basics - paging.
Enter Buttons... we simply added buttons for scrolling up/down and you can easily code those to scroll one row or one page at a time. Standard button symbols are prev/next are easily recognizable and understood by the user AND they are easier to click (you can even setup a repeating click) then touching and dragging a scrollbar.
One of the "rules" of touchscreen devices (that I found in my research anyway) is to avoid the use of scrollbars because the surface area (even when the width is increased) does not fall within the standard parameters of a touchscreen "clickable/touchable" surface area.
So while this may not benefit the original poster, hopefully someone that comes by this in the future will benefit.
No, the grid does not use an UltraScrollBar control. It uses the same UIElements that the UltraScrollBar uses. But the width of the scrollbars is hard-coded into the grid to pick up the system settings and there is no way to change this.
You should Submit a feature request to Infragistics