Buttons in CXTPReportControl - howto? |
Post Reply |
Author | |
phil
Newbie Joined: 07 March 2005 Status: Offline Points: 3 |
Post Options
Thanks(0)
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? |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
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 |
|
larryp
Groupie Joined: 15 January 2005 Location: United States Status: Offline Points: 61 |
Post Options
Thanks(0)
|
Could this be added to the samples for the next release?
|
|
phil
Newbie Joined: 07 March 2005 Status: Offline Points: 3 |
Post Options
Thanks(0)
|
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 :( |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
2005-03-15_020517_rs.zip - sample for you
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
phil
Newbie Joined: 07 March 2005 Status: Offline Points: 3 |
Post Options
Thanks(0)
|
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? |
|
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 |