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 » How to update PropertyGridCtrl's treeview programmatically? Collapse All
Subject Author Date
jb lee Jan 9, 2008 - 2:51 PM

I add a button in your sample app.
and select the top-left button in the combo-box.

How do I update the treeview in the program?
Part sample is like this. And, it only update button1’s text color.

void CMainDlg::OnBnClickedButton1()
{
static    COLORREF rgbs[3] = {RGB(255,0,0), RGB(0,255,0), RGB(0,0,255) };
static int idx = 0;
    m_Btn1.TextColorSet(rgbs[idx]);
...
    // update propertygrid control here!!!
...
    idx = ( idx + 1 ) % 3;
}

Technical Support Jan 14, 2008 - 11:56 AM

The CExtPropertyGridCtrl::PropertyStoreSynchronize() method updates the entire content of a property grid control and you should invoke this method only one time after several property values were changed.


Technical Support Jan 11, 2008 - 8:32 AM

It is not completely clear what you mean by "update the treeview". If you want to change the value of a property grid’s cell, you should have a pointer to the cell object.

jb lee Jan 12, 2008 - 9:11 AM

Sorry, I mean refresh.
In the code, I modify the text color. But, This time, the old color value is in the property grid.