Print Page | Close Window

BUG: DropDown button in constraint edit wrong

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=23353
Printed Date: 26 April 2024 at 8:53pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: BUG: DropDown button in constraint edit wrong
Posted By: mgampi
Subject: BUG: DropDown button in constraint edit wrong
Date Posted: 01 June 2017 at 11:01am
Hi;

Take a look at the attached screenshot!
The drop down button is overlapped by the edit (text) part of the item when in edit mode:



The real value for the selected item is 0,1 (German 0.1).

I create the column in this way:
 

  TheColumn=AddColumn(new CXTPReportColumn(Column++, L"Sample Rate", 75, TRUE, XTP_REPORT_NOICON, TRUE, TRUE));   
  TheColumn->SetHeaderAlignment(xtpColumnTextRight);
  TheColumn->SetAlignment(xtpColumnTextRight);

  TheColumn->GetEditOptions()->m_bConstraintEdit=TRUE;
  TheColumn->GetEditOptions()->AddComboButton(TRUE);

  std::wostringstream oss;
  for (size_t i=0; i<sizeof(ValidSampleRates)/sizeof(ValidSampleRates[0]); i++) {
    oss.str(L""); 
    oss << std::setprecision(ValidSampleRates<1?1:0) << std::fixed << ValidSampleRates;
    TheColumn->GetEditOptions()->AddConstraint(oss.str().c_str(), i);
  }

The item itself is a CXTPReportRecordItemText instance with the string set to the shown value of 0,1.

Is it a problem of the alignment?

I'm using in this case v17.3 in VS2008.

Any help is welcome!




-------------
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017



Replies:
Posted By: olebed
Date Posted: 01 June 2017 at 12:30pm
Hello Martin,

I can't understand how you get such  drop down button.
I can get only old-style  button.


Posted By: mgampi
Date Posted: 02 June 2017 at 1:23am
The app is skinned using Office 2010 black style! Perhaps thats the reason...

Here is the code how I initialize the control within the OnInitDialog() function:

  SetTheme(xtpReportThemeResource);
  GetToolTipContext()->SetStyle(xtpToolTipResource);
  SetImageList(&Images_);

  SetGridStyle(FALSE, xtpReportGridNoLines);
  SetGridStyle(TRUE, xtpReportGridNoLines);

  AllowEdit(TRUE);
  SetMultipleSelection(FALSE);

  GetReportHeader()->SetAutoColumnSizing(FALSE);
  GetReportHeader()->AllowColumnRemove(FALSE);
  GetReportHeader()->AllowColumnReorder(FALSE);


I do NOTHING special and the item itself is a CXTPReportRecordItemText() instance.

I can reproduce it in any column of other report controls too. The button seems transparent.


-------------
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017


Posted By: mgampi
Date Posted: 02 June 2017 at 1:51am
Hi;

I made a few more tests and after removing skinning from the application

  std::wstring StylesPath=GetModuleDirectory();
  StylesPath.append(L"Styles\\Office2010.cjstyles");

  if (XTPSkinManager()->LoadSkin(StylesPath.c_str(), L"NormalBlack.ini"))
    XTPSkinManager()->SetApplyOptions(xtpSkinApplyFrame | xtpSkinApplyColors | xtpSkinApplyMetrics | xtpSkinApplyMenus);


the old combo button appeared. So it's a skinning related bug!
The combination of skinning and AddComboButton(Inside=TRUE) leads to the drawing problem!
Setting the parameter to FALSE has no effect in my case, because its the last column of the control and therefore the button is still drawn inside the item area.

But now I have another problem!

As soon as I click onto the combo button the edit part of the item disappears (is cleared)! Why?
Here's a screenshot of this unwanted behaviour:



When I then select an item in the list the list is closed but the item stays empty. When I then change the selection to another record, the text of the new selected item is drawn. Strange!

Therefore I need a fix for two problems:
  1. Button behaviour when skinning is enabled.
  2. Cleareditem text part when combo button is pressed.

TIA



-------------
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017


Posted By: mgampi
Date Posted: 02 June 2017 at 2:36am
Hello;

I can reproduce the bug using your report sample -> Quality assurace -> ComboBox
Turn on skinning (View > Skin Framework > Office 2010) then go to Report Control > Quality Assurance ComboBox. Don't turn on "Show non-active inplace buttons"!
Resize the first column that its almost the same size as the text itself. Now click into the item and voilá you see the transparent button overlapping the text and artefacts on the right side of the item area.

 


-------------
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017


Posted By: mgampi
Date Posted: 06 October 2020 at 2:37pm
Hi;

I just tested this with Toolkit 19.2 and 19.3.
IT'S STILL THERE!!!
When can we expect a fix for this.
Here's another screenshot from our application:




-------------
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017



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