property grid is not displayed in my view |
Post Reply |
Author | |
mhwong
Newbie Joined: 18 June 2008 Status: Offline Points: 4 |
Post Options
Thanks(0)
Posted: 18 June 2008 at 2:51pm |
i am using CXTTabCtrl to have a tabbed dialog and i am adding CFormViews as my tabs.
in my code i have a view called CMicrophoneView where i am trying to use CXTPPropertyGrid however the property grid does not get displayed, i used the same approach as the property grid sample application that came with codejock. if i move the mouse over the area where i expected the property grid control to be, i can see arrows for manipulating the control. so i think it has to do with how the property grid is being painted, but i dont know how to solve this problem. source code provided below, any help would be greatly appreciated, thanks. uploads/20080618_144125_code.zip |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Just bring it to front:
m_grid.SetWindowPos(&CWnd::wndTop, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE);
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
mhwong
Newbie Joined: 18 June 2008 Status: Offline Points: 4 |
Post Options
Thanks(0)
|
thanks that makes it display, however when i try to put in a combo box when i click on the combo box the drop down list does not display
i do the following CXTPPropertyGridItem* pItem = pGrid->AddChildItem(new CXTPPropertyGridItem(_T("ComboBox"), 0); pItem->GetConstraints()->AddConstraint(_T("hello world")); pItem->SetFlags(xtpGridItemHasComboButton|xtpGridItemHasEdit); pItem->SetConstraintEdit(TRUE); |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
I can't reproduce it with attached sample. I added same code - works fine.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
mhwong
Newbie Joined: 18 June 2008 Status: Offline Points: 4 |
Post Options
Thanks(0)
|
Can you please try with this sample? For the second tab, second property grid, for charger current, I can go through the combo box values by using arrow key, but it does not display the combo box. Thanks. |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi, OnGridNotify have to return FALSE by default....
also to reduce flickers add
GetDlgItem(IDC_FG_PARAMS_GRID)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_CHARGE_CURRENT_GRID)->ShowWindow(SW_HIDE); before you create grids. |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
mhwong
Newbie Joined: 18 June 2008 Status: Offline Points: 4 |
Post Options
Thanks(0)
|
I have a report control in tab1, and a property grid in tab2. If something changes in one of the columns in the report control, I need to display the same value in one of the fields in the property grid on tab 2. UpdateData() will not work. What is the best way to do this? Even if I have a document associated with the view, I can’t get it to work with UpdateAllViews(), right? In this code, if I change the value of Capacity in mAh, then in tab2, the Max Capacity does get changed, but I also get a crash on the second attempt!! |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Bug in your code:
replace
char* strCap;
to char strCap[10];
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |