Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - [CLOSED] Set dropdown style for report items
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Topic Closed[CLOSED] Set dropdown style for report items

 Post Reply Post Reply
Author
Message
GRLEX View Drop Down
Groupie
Groupie
Avatar

Joined: 17 February 2009
Location: Ukraine
Status: Offline
Points: 27
Direct Link To This Post Topic: [CLOSED] Set dropdown style for report items
    Posted: 26 September 2011 at 5:45am
Hi, i have report control with my own items in it. Here my class for items

enum MyStatus {
stString1,
stString2
};//------------------

class CMyItemClass : public CXTPReportRecordItem
{
public:
CMyItemClass(MyStatus  status) {
m_status = status;
GetEditOptions(NULL)->AddConstraint(_T("Some string 1"), stString1);
GetEditOptions(NULL)->AddConstraint(_T("Some string 2"), stString2);
......
GetEditOptions(NULL)->m_bConstraintEdit = TRUE;
GetEditOptions(NULL)->AddComboButton(1);
}
CString GetCaption(CXTPReportColumn* /*pColumn*/) {
CXTPReportRecordItemConstraint * pConstraint = GetEditOptions(NULL)->FindConstraint(m_status);

if (pConstraint == NULL) {
return L"Default";
}

return pConstraint->m_strConstraint;
}
void SetCaption(LPCTSTR sCaption) {
CXTPReportRecordItemConstraint * pConstraint = GetEditOptions(NULL)->FindConstraint(sCaption);

if (pConstraint == NULL) {
m_status = (MyStatus)0;
} else {
m_status = (MyStatus)pConstraint->m_dwData;
}
}
void OnConstraintChanged(XTP_REPORTRECORDITEM_ARGS* /*pItemArgs*/, CXTPReportRecordItemConstraint * pConstraint) {
m_status = (MyStatus)pConstraint->m_dwData;
}
MyStatus  GetValue() {
return m_status;
}
protected:
MyStatus  m_status;
};//---------------------------------------------------------

I need to do dropdown style for my item like in standart combobox CBS_DROPDOWNLIST ( selection in dropdown changes when mouse move)
How i can do this?

Thanks.
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Direct Link To This Post Posted: 26 September 2011 at 10:43am
Hello,

please notice our support policy and open a support ticket for further help.

http://forum.codejock.com/forum_posts.asp?TID=14125&FID=125&PR=3&title=notice-codejock-support-policy

Thanks Andre

Codejock support
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.184 seconds.