Expand button and edit control. |
Post Reply |
Author | |
Sudhakar
Newbie Joined: 17 February 2009 Status: Offline Points: 5 |
Post Options
Thanks(0)
Posted: 18 February 2009 at 7:21am |
Hi! How can we show the expand button in the report control cell when the AllowEdit is FALSEl? Or
How can I hide the edit control when the AllowEdit is TRUE and just show expand button?
My requirement is below:
I want to display an expand button in a cell of report control and when this button is pressed, then it invokes a dialog which contains the controls to select line color,style and width. Once the selection of these attributes is done and clicked "OK" button of this dialog, then I want to draw a line in the report control cell with selected color, style and thickness.
I am able to show expand button when AllowEdit is TRUE. But this also shows a edit control along with expand button when the cell is clicked. As the result if there is any line drawing in the current cell, then that line is being covered by the edit control. So I want to hide the edit control as it is not necessary in this scenario.
Please provide some suggestions/hints.
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Try to SetInplaceCellButton(TRUE) make cell size equal button size.
Example of setting (ReportSample - TaskListView:
int CTaskListView::OnCreate(LPCREATESTRUCT lpCreateStruct){ .......................//HOW TO SET BUTTON INSIDE CELL << int iAiB0 = pColumnImportance->GetEditOptions()->arrInplaceButtons.GetCount();CXTPReportInplaceButton* pBtn0 = pColumnImportance->GetEditOptions()->arrInplaceButtons.GetAt(iAiB0 - 1); pBtn0->SetInsideCellButton(TRUE); pColumnDueDate->GetEditOptions()->m_bAllowEdit = FALSE; pColumnDueDate->GetEditOptions()->AddComboButton(); int iAiB1 = pColumnDueDate->GetEditOptions()->arrInplaceButtons.GetCount();CXTPReportInplaceButton* pBtn1 = pColumnDueDate->GetEditOptions()->arrInplaceButtons.GetAt(iAiB1 - 1); pBtn1->SetInsideCellButton(TRUE); pColumnPercent->GetEditOptions()->m_bAllowEdit = FALSE; pColumnPercent->GetEditOptions()->m_bConstraintEdit = TRUE; pColumnPercent->GetEditOptions()->AddSpinButton(); int iAiB2 = pColumnPercent->GetEditOptions()->arrInplaceButtons.GetCount();CXTPReportInplaceButton* pBtn2 = pColumnPercent->GetEditOptions()->arrInplaceButtons.GetAt(iAiB2 - 1); pBtn2->SetInsideCellButton(TRUE); pBtn2->SetSpinButtonStep(10); //HOW TO SET BUTTON INSIDE CELL >> ...................
}
|
|
Sudhakar
Newbie Joined: 17 February 2009 Status: Offline Points: 5 |
Post Options
Thanks(0)
|
Thank you mdoubson for the help. It t works fine, but this is generating XTP_NM_REPORT_INPLACEBUTTONDOWN message as soon as I click on the cell that contain this expand button. Hence the dialobox which I am dispalying in this event is being displayed. I would like to display the dialog box only when I click on the expand button. I would like to display button first on the click of cell, then on the click of button I want to show the dialog box(cell should not go into edit mode). Please let me know if you have suggestion.
Regards,
Sudhakar S.
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
In 13.1 I modified functions
GetEditOptions()->AddComboButton(TRUE); //default FALSE - means not Set Inside Cell, TRUE - Set Inside Cell
GetEditOptions()->AddSpinButton(TRUE); //same thing |
|
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 |