Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » CExtGridBaseWnd, grid size Collapse All
Subject Author Date
a a Apr 5, 2006 - 8:29 PM

Is it possible to get the total size of the grid? (just the part representing data)

I would like to restrict the resizing of a control bar (which contains a datagrid) so that the user can’t see the blank area at the bottom.

Technical Support Apr 6, 2006 - 11:12 AM

You can get the total size of the grid by traversing all the rows and columns and querying their extents but, in our opinion, there is a little point in restricting the size of a control bar window which was designed as a Visual Studio .NET / Visual Studio 2005 like resizable and redockable panel window without any restriction on its size. The main problem is that the size of one resizable control bar always depends on its neighboring bars. Although it is possible to restrict the width of a vertically docked control bar or the height of a horizontally docked bar, but this restriction makes sense only if it is standalone bar, in other words, in does not share its row /column with other bars. Or you can restrict its size if it is the only control bar in your main frame window. Why do not you resize the grid columns in some better way according to the size of the grid window?

a a Apr 6, 2006 - 8:20 PM

That’s right, I totally forgot the control bar can be docked at the top of the frame window.

Just another case is the tool I sent to you by email. (the datagrid is inside a parent control with a splitter, and the parent control is in the control bar)
The datagrid is resized by a splitter. Restricting the splitter position might be useful for the user.
I guess I’ll have to try what you said to retrieve the total width.

Technical Support Apr 9, 2006 - 8:10 AM

We described how to implement this in the e-mail we just sent you.