Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - m_bShowNonActiveInPlaceButton
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

m_bShowNonActiveInPlaceButton

 Post Reply Post Reply
Author
Message
larryp View Drop Down
Groupie
Groupie


Joined: 15 January 2005
Location: United States
Status: Offline
Points: 61
Post Options Post Options   Thanks (0) Thanks(0)   Quote larryp Quote  Post ReplyReply Direct Link To This Post Topic: m_bShowNonActiveInPlaceButton
    Posted: 11 November 2009 at 10:07am
I have a report control where some rows have a combobox.  I want the combobox to always be drawn.  Like the property grid allows.
 
So, I do the following:
  1. Set the flag m_bShowNonActiveInPlaceButton to TRUE in the paint manager
  2. When adding the item, I call pItem->GetEditOptions(NULL)->AddComboButton(TRUE).

This always draws the combobox, but when I click on the combobox button, the combobox does not expand.  Instead the row is selected and I have two overlapping comboboxes drawn.  Clicking on the second comobox expands the combobox list.

 
ToolKitPro 13.2.1 
Windows 7 (32-bit)
Visual Studio 2008
 
Larry
 
 
 
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 24 November 2009 at 7:19pm
Try MFC Sample - ReportDialog - with little changes in OnInitDialog:

CXTPReportRecord* pRec = m_wndReportCtrl.AddRecord(new CMessageRecord(msgImportanceNormal, FALSE, TRUE, _T("postmaster@mail.codejock.com"), _T("Undeliverable Mail"), odtSent, 7, TRUE, 10,

odtCreated, odtReceived, strEmpty, strEmpty, strMessage,

strEmpty, strEmpty, strEmpty,

strEmpty, strEmpty,

strMessage)); odtSent -= 80;

pRec->GetItem(3)->GetEditOptions(NULL)->m_bConstraintEdit = FALSE;

pRec->GetItem(3)->GetEditOptions(NULL)->AddConstraint(_T("Low"), 0);

pRec->GetItem(3)->GetEditOptions(NULL)->AddConstraint(_T("Normal"), 1);

pRec->GetItem(3)->GetEditOptions(NULL)->AddConstraint(_T("High"), 2);

pRec->GetItem(3)->GetEditOptions(NULL)->m_bAllowEdit = FALSE;

pRec->GetItem(3)->GetEditOptions(NULL)->AddComboButton(TRUE);

m_wndReportCtrl.AllowEdit(TRUE);

m_wndReportCtrl.FocusSubItems(TRUE);

m_wndReportCtrl.GetPaintManager()->m_bShowNonActiveInPlaceButton = TRUE;

Working fine on XP
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 24 November 2009 at 8:16pm
I can confirm the problem on Vista and Win7 - while XP or Win7 - XP mode working fine.
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 24 November 2009 at 9:14pm
Please try this demo - it have one combo - column-based combo and one row with cell-based combo.
 
 
This sample working well on Vista and on Win7
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 26 November 2009 at 12:21am
Retest same app on Win7 - now with Aero ON. On Combo button click picklist shows for very short moment and disapears. Without Aero - as good as on XP.
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 27 November 2009 at 11:53pm

Today's build with Common files updates have no problems running on Win7 with Aero - https://forum.codejock.com/uploads/DemoVersion/ReportDialogStatic.rar

Back to Top
larryp View Drop Down
Groupie
Groupie


Joined: 15 January 2005
Location: United States
Status: Offline
Points: 61
Post Options Post Options   Thanks (0) Thanks(0)   Quote larryp Quote  Post ReplyReply Direct Link To This Post Posted: 08 December 2009 at 1:04pm

I downloaded the sample and ran it.  Two things I notice:

1) If I click on the combobox down arrow icon, the combobox does not expand. It just puts the focus on the row.
2) After clicking on the icon, the displayed icon is narrower than the other icons and there is a black vertical line to the left of it.
 
--Larry
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.203 seconds.