Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
625
Resizing Grids, Splitters, Scrollbars...Could Use Some Help...
posted

Hi all,

I'm looking into a 'scrolling' issue and I wasn't sure where to post it.  I believe this is a windows issue and not an Infragistics issue, but I thought maybe someone had dealt with it before.

What I'm trying to do is have a grid that I can expand/collapse and one that I click, drag, and resize.  It sounds simple enough, put the grid inside of an UltraExpandableGroupBox and put a splitter underneath it, dock the grid to fill, dock the UltraExpandableGroupBox to 'Top' and the splitter to 'Top'.  Now you can drag the splitter and resize the grid, and you can click the +/- signs to collapse/expand it.

The problem is when I have 4 or 5 grids on my form and I still want to be able to expand/collapse each one and resize each one.  Once the grids fill the form completely, the splitter will not allow you to increase the size of the grids anymore.  We want the user to be able to drag the splitter and increase the size, even if that means the grids do not fit on the form anymore (at which point scroll bars should appear).

One solution I tried was to put all of the grids inside of a single panel and anytime any of the splitters were moved, my code would add the height of all the expandablegroupboxes and add '100' and set the height of the panel to that value.  This allowed the user to increase the size of grids with the splitter - but, it meant there would always be 100 pixels of deadspace after the last grid and that you could only increase the size 100 pixels at a time.

The next solution was to not use a splitter and, instead, use an UltraGroupBox and listen for mouse up, mouse down, and mouse move events.  Each ultraGroupBox was used just like a splitter would be, and it would resize the height of the control above it.  This meant no dead space, and that the user could increase the size as much as they like.  However, visually, the screen looks bad.  I've tried refreshing/updating/invalidating the controls each time the height is adjusted, and using BeginUpdate/EndUpdate, and enabling double buffering on the forum - but the resizing is just plain ugly and I can't seem to improve it.

Does anyone have a 3rd, better, solution to this problem? 

 

Parents
No Data
Reply Children