AddComboButton behaviour |
Post Reply |
Author | |
AlbertoB
Newbie Joined: 06 July 2011 Status: Offline Points: 8 |
Post Options
Thanks(0)
Posted: 06 July 2011 at 8:17am |
Hi,
I have a report control with some cells that are combo boxes.
My problem is that it only works to double click the cell to expand de combo options.
Is there any property or any way to set the combo cell to expand just with a single click in the combobutton?
I got a sample from this thread in the forum
wich does exactly what I need in the column From.
I'm using version 13.4 and the sample is with version 13.2
Could it be a different behaviour in my version?
This is a snipet of my code in case it helps
grid->FocusSubItems = VARIANT_TRUE;
grid->PaintManager->ShowNonActiveInPlaceButton = VARIANT_TRUE; XRC::IReportRecordItemEditOptionsPtr editOptions= record->Item[ 1]->EditOptions;editOptions->ConstraintEdit = VARIANT_FALSE;
editOptions->Constraints->Add("Value1", 0);editOptions->Constraints->Add("Value2", 1);editOptions->Constraints->Add("Value3", 2);editOptions->AllowEdit = VARIANT_FALSE; editOptions->AddComboButton(VARIANT_TRUE); Any ideas? Thank you.
AB.
|
|
Fredrik
Senior Member Joined: 22 June 2005 Status: Offline Points: 235 |
Post Options
Thanks(0)
|
Hi,
I just would like to bump this issue since I now have the same problem. Basically, if I click the arrow on a combo box I'd like the combo box to expand instead of having to click twice (This with the properties m_bShowNonActiveInPlaceButton TRUE and having editable combo box items.) To reproduce, use ReportSample.exe, click Report Control > Quality assurance > ComboBox. Check the box for "Show non-active inplace buttons". Try clicking the combo box arrows in the two first columns. Does anyone has a solution/workaround for it? CodeJock: is this anything that is planned to be fixed? Cheers,
|
|
Windows 10, Visual Studio 20157, Toolkit Pro 18.3.0
|
|
olebed
Admin Group Joined: 01 July 2014 Location: Ukraine Status: Offline Points: 841 |
Post Options
Thanks(0)
|
Hi Fredrik,
You can use flag CXTPReportRecordItemEditOptions::m_bExpandOnSelect (IReportRecordItemEditOptions.ExpandOnSelect) for this purpose.
But expanding occurs when you click on any part of report cell. Regards, Oleksandr Lebed |
|
Fredrik
Senior Member Joined: 22 June 2005 Status: Offline Points: 235 |
Post Options
Thanks(0)
|
Great, thanks Oleksandr.
I see this option was added in 16.3.1. I will try it out when 16.4.1 is released (hopefully soon ;-)). But I still would like to add it as a wish that a click in the edit field edits the text and a click on the combo box arrow expands the combo box instead of just setting focus to the edit field. Best regards, Fredrik
|
|
Windows 10, Visual Studio 20157, Toolkit Pro 18.3.0
|
|
Fredrik
Senior Member Joined: 22 June 2005 Status: Offline Points: 235 |
Post Options
Thanks(0)
|
Hi, I just tried 16.4.0. Shouldn't
CXTPReportRecordItemEditOptions* CXTPReportRecordItem::GetEditOptions(CXTPReportColumn* pColumn) { if (m_pEditOptions) return m_pEditOptions; if (pColumn) return pColumn->GetEditOptions(); ... be CXTPReportRecordItemEditOptions* CXTPReportRecordItem::GetEditOptions(CXTPReportColumn* pColumn) { if (pColumn) return pColumn->GetEditOptions(); if (m_pEditOptions) return m_pEditOptions; ... ? Right now I did not get the m_bExpandOnSelect to work without modifying pColumns->GetEditOptions(nullptr) first (I thought I could just modify the edit options from CXTPReportColumn* given by AddColum()). But as a solution to my original question, this does not work. I want to expand the the combo box when I click on the combo box arrow (as combo boxes usually work) and be able to enter a new value if I click in the edit field portion of the cell. With m_bExpandOnSelect set, I cannot enter a new value. So AllowEdit does not work with this flag set. Regards, Fredrik |
|
Windows 10, Visual Studio 20157, Toolkit Pro 18.3.0
|
|
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 |