Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - AddComboButton behaviour
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

AddComboButton behaviour

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


Joined: 06 July 2011
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote AlbertoB Quote  Post ReplyReply Direct Link To This Post Topic: AddComboButton behaviour
    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.
Back to Top
Fredrik View Drop Down
Senior Member
Senior Member


Joined: 22 June 2005
Status: Offline
Points: 235
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fredrik Quote  Post ReplyReply Direct Link To This Post Posted: 06 October 2014 at 7:46am
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
Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 06 October 2014 at 11:50am
Hi Fredrik,

You can use flag CXTPReportRecordItemEditOptions::m_bExpandOnSelect  (IReportRecordItemEditOptions.ExpandOnSelect)  for this purpose.
CXTPReportRecordItemEditOptions *pEditOptions = pColumn->GetEditOptions();
  pEditOptions->m_bExpandOnSelect = TRUE;

But expanding occurs when you click on any part of report cell.

Regards,
 Oleksandr Lebed
Back to Top
Fredrik View Drop Down
Senior Member
Senior Member


Joined: 22 June 2005
Status: Offline
Points: 235
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fredrik Quote  Post ReplyReply Direct Link To This Post Posted: 10 October 2014 at 11:35am
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
Back to Top
Fredrik View Drop Down
Senior Member
Senior Member


Joined: 22 June 2005
Status: Offline
Points: 235
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fredrik Quote  Post ReplyReply Direct Link To This Post Posted: 27 October 2014 at 4:39pm
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
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.156 seconds.