Print Page | Close Window

Expand button and edit control.

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=13439
Printed Date: 17 November 2024 at 12:17pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Expand button and edit control.
Posted By: Sudhakar
Subject: Expand button and edit control.
Date 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.
 



Replies:
Posted By: mdoubson
Date Posted: 21 February 2009 at 12:11am
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 >>

...................
}


-------------
Mark Doubson, Ph.D.


Posted By: Sudhakar
Date Posted: 26 February 2009 at 6:39am
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.  


Posted By: mdoubson
Date Posted: 03 April 2009 at 12:13am
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



-------------
Mark Doubson, Ph.D.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net