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 Tech Support » Bug in tree grid Collapse All
Subject Author Date
Rado Manzela May 13, 2008 - 10:30 AM

Typing second time after logging me out after posting first message :(((


Ok I’ve found 2 problems in tree grid. Here is VS2005 project with compiled demo exe: http://rrrado.szm.sk/grid_bug.rar


1. Print preview draws second line shifted to left ("98" should be under "313")


2. HoverInfoGet().m_dwAreaFlags sometimes does not work in CChildView::OnContextMenu. Sometimes it returns __EGBWA_NOWHERE althought mouse pointer is above valid cell. You can get it when you select some unselected cell/row with left mouse button and then try to invoke context menu using right mouse button. Maybe you’ll have to do this 10 times to get my error message.


Can you check it please? Thank you.

Technical Support May 16, 2008 - 2:16 PM

We would like to discuss a couple of issues:

1) The VK_LEFT and VK_RIGHT keys are processed by the CExtTreeGridWnd control (in the CExtTreeGridWnd::OnGbwAnalyzeCellKeyEvent() method). It is possible to change the behavior of these keys so that when pressed they collapse/expand rows only, scroll only, collapse/expande by default and scroll with some modifier key (VK_SHIFT or VK_CONTROL). We would like to know your point of view. We assume the current behavior provided by the CExtTreeGridWnd::OnGbwAnalyzeCellKeyEvent() virtual method is too simple and we can provide some new and customizable behavior instead.

2) We have re-tested the hit-testing results again and we never get nowhere code. May be we need to do some special sequence of steps to get it?

Rado Manzela May 19, 2008 - 8:08 AM

1)  it depends on tree size and structute. There is not a big usage difference in my tree so you could check standard windows tree behaviour for this


2) in my project resize 2nd column to prevent tooltip.


- Left click at "313" to select row, right click at 313

- Left click at "98" to select row, right click at 98

- back to beginning until "NOWHERE!" message box (there is random # of repetiotions needed - from 2 to 10)

Maybe you was trying it with another prof-uis version ? (You could try my exe with 2.82 debug dll)

Technical Support May 15, 2008 - 4:00 AM

The current version of CExtPPVW requires all the grid cells to have valid, non-NULL pointers. Although, any grid supports NULL pointers in any cell locations, typically the grid controls become completely initialized with grid cells. You initialize the tree grid using the following code at the end of the CChildView::PreSubclassWindow() method:

      CExtGridCellNumber *item;
      item = (CExtGridCellNumber *)ItemGetCell(it,0,0,RUNTIME_CLASS(CExtGridCellNumber));
      item->_VariantAssign(22);
      item = (CExtGridCellNumber *)ItemGetCell(it,1,0,RUNTIME_CLASS(CExtGridCellNumber));
      item->_VariantAssign(313);

      it = ItemInsert( NULL, ULONG(-1), 1 );
      item = (CExtGridCellNumber *)ItemGetCell(it,1,0,RUNTIME_CLASS(CExtGridCellNumber));
      item->_VariantAssign(98);
Please add one line of code ( _VariantAssign() even is not needed, we only need an existing cell object):
      item = (CExtGridCellNumber *)ItemGetCell(it,0,0,RUNTIME_CLASS(CExtGridCellNumber));


Rado Manzela May 16, 2008 - 3:49 AM

Thank you, I’ll check this (will you fix it in next release?)


What about 2nd bug?