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 » ExpandedSet method and some problems it cuases... Collapse All
Subject Author Date
Takis Takoglou Apr 22, 2009 - 7:40 AM

Good day,


I am using the ExpandedSet(false) method to make a Category in my PropertyGrid appear collapsed.


While this works fine under most circumstances, when i insert into this category another one which is not collapsed, the program crashes.


To make things clear:

   
CExtPropertyCategory *Child = new CExtPropertyCategory();//Create a sub-category
Child->ItemInsert(aValue);//Add a value in it
CExtPropertyCategory *Parent = new CExtPropertyCategory();//Create the "root" category
Parent->ExpandedSet(false);//And set it to appear collapsed
Parent->ItemInsert(Child);//Insert the child into the parent
PropStore.ItemInsert(Parent);//Insert Parent in Property Store
GridCtrl.PropertyStoreSynchronize();//****HERE THE PROGRAM CRASHES***//



Note that if the child is also collapsed, this doesn’t happen...

Also if "Ignore" is pressed, the Property grid is displayed correctly i.e. Parent collapsed with child expanded.



How can i overcome this problem?



Thanx in advance,

Stakon.


 

Technical Support Apr 22, 2009 - 11:34 AM

There are the following lines of code in the PropertyGrid sample application:

CExtPropertyCategory * pCategoryAppearance =
                        new CExtPropertyCategory( _T("Appearance") );
            //pCategoryAppearance->ExpandedSet( false );

The Appearance category has some subcategorizes. If we uncomment the last line, then the Appearance category will appear collapsed when it has expanded children. There are several unwanted assertions in Prof-UIS 2.84 in this case. But there are no crashes/assertions occur in Prof-UIS 2.85. We suspect the several tree grid improvements we did affected to this issue. We can provide you with the source code update.

Takis Takoglou Apr 23, 2009 - 12:24 AM

Yes , please


It would be nice to have the updated code.

You can send it at my registered email address.


Thanx in advance,

Stakon.

Technical Support Apr 23, 2009 - 12:44 PM

Do you have any company e-mail? We need to send you the FTP download information and we would prefer not to send such login information to mail boxes on public mail servers.

Takis Takoglou Apr 23, 2009 - 4:36 AM

Today some new problems rose while using the Property Grid.


In particular I am using a PropertyGrid which contains many cells, so the vertical scrollbar is enabled.

When i add a new item (i.e. a value cell) in the grid by pressing  a button in the same grid and then use grid.PropertyStoreSnchronize()

the view resets to the top tree node and the scrollbar moves in the uppermost position. This behavior isn’t user friendly.

I would like to find a way so that the view doesn’t change once i synchronize the PropertyStore, but stays in the same position (i.e. the button just pressed).

Note that if i simply change a value of another cell which is out of view and synchronize, the view does not change. This only happens if i add a new item in the grid and then synchronize.

Also note that i have tried to use grid.PropertyStoreSet(pPropStore) and the view is not reset to the top node but it does change a bit.



Thanx in advance,

Stakon.

Technical Support Apr 27, 2009 - 11:05 AM

This is a known issue. The CExtPropertyGridCtrl::PropertyStoreSynchronize() completely removes all the grid cells, tree rows and columns in all the tree grids inside the property grid control. Then this method initializes new content inside the tree grid windows. I.e. this method completely reinitializes the tree grids. Modifying property store structure on the fly is not an ordinal task. The property grid control cannot detect how serious are property tree structure modifications and simply reinitializes tree grids. You can insert all the possible property values and categories into your property store’s tree and make un-available property values read-only.


Takis Takoglou Apr 22, 2009 - 8:08 AM

If this helps , the error produced is Debug Assertion Failed

in File ExtGridWnd.cpp  Line 6310.