Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Buttons in CXTPReportControl - howto?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Buttons in CXTPReportControl - howto?

 Post Reply Post Reply
Author
Message
phil View Drop Down
Newbie
Newbie


Joined: 07 March 2005
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote phil Quote  Post ReplyReply Direct Link To This Post Topic: Buttons in CXTPReportControl - howto?
    Posted: 07 March 2005 at 4:09am
Hi!

So far I've only found this thread
http://forum.codejock.com/forum_posts.asp?TID=1193&KW=bu tton+report+control
regarding the topic.

Unfortunately none of the provided code examples coming with XT Pro contains any CXTPReportInplaceButton(s), and I can't get it to work.

Here's what I've tried:

===
CRect rcItem(0, 0, 20, 20);
CXTPReportRow *pRow = m_ReportControl.GetRows()->GetAt(1);
XTP_REPORTRECORDITEM_ARGS itemArgs(&m_ReportControl, pRow, pColumn1);
          
CXTPReportInplaceButton Button(1234);
          
Button.Create(&itemArgs, rcItem);

m_ReportControl.RedrawControl();
===

compiles, runs, but there's no button...

here's what I get:



and here's what I'd like to achieve:



or



anyone got an idea how to do that?
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 10 March 2005 at 9:54am

CXTPReportColumn* pColumnImportance = m_wndReport.AddColumn(new CXTPReportColumn(COLUMN_IMPORTANCE, _T("Importants"), 18, FALSE, 1));

 pColumnImportance->GetEditOptions()->AddExpandBu tton();

for custom button:

pColumnImportance->GetEditOptions()->arrInplaceButtons .Add(new CSendButton(123));

class CSendButton : public CXTPReportInplaceButton

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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: 12 March 2005 at 2:39pm
Could this be added to the samples for the next release?
Back to Top
phil View Drop Down
Newbie
Newbie


Joined: 07 March 2005
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote phil Quote  Post ReplyReply Direct Link To This Post Posted: 14 March 2005 at 3:13am
Originally posted by larryp larryp wrote:

Could this be added to the samples for the next release?


I second that, it would help a lot.


but thx for your reply.

I managed to produce on inplace button now, although I can't get it to stay within its cell boundaries.

I tried getting the caption rectangle by using

CXTPReportRecordItem* pItem = pRecord->AddItem(new CXTPReportRecordItemText(_T("bla")));
pItem->GetCaptionRect(&itemArgs, rcItem);

but that doesn't seem to work :(
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 15 March 2005 at 2:05am
2005-03-15_020517_rs.zip - sample for you
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
phil View Drop Down
Newbie
Newbie


Joined: 07 March 2005
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote phil Quote  Post ReplyReply Direct Link To This Post Posted: 17 March 2005 at 12:42am
thx for the sample

but how do you get the button to be visible all the time - not just when you click to edit the cell?
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.172 seconds.