Print Page | Close Window

Indicate Combo present as cell's in-place 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=13803
Printed Date: 05 October 2024 at 2:24am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Indicate Combo present as cell's in-place control
Posted By: mdoubson
Subject: Indicate Combo present as cell's in-place control
Date Posted: 25 March 2009 at 10:27am
Add extra image to your image list with combobox-like triangle arrow
Add simple code while adding items to new record
   Set Item = Record.AddItem(Status)
    Item.Icon = 11
    Item.Alignment = xtpAlignmentIconRight
  Now you will always see Combox-like arrow in non-active cell
Same for other buttons - just use related images (e.g. [...])
 
See static app https://forum.codejock.com/uploads/DemoVersion/ReportSampleSatic.rar - https://forum.codejock.com/uploads/DemoVersion/ReportSampleSatic.rar  (open Task...)


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



Replies:
Posted By: keepITcool
Date Posted: 08 April 2009 at 5:46am
Your example crashed in ControlTest/HeaderFooter Test.
I've experienced similar crashes, with incomplete records.

-------------
Xtreme :SuitePro (ActiveX) version 13.1.0
Language: VB 6.0
Platform: WinXP/Win7(32+64bit)


Posted By: mdoubson
Date Posted: 08 April 2009 at 9:28am
May be but how this related to added icon? But thank you - it was a bug in sample:

void CTaskRecord::GetItemMetrics(XTP_REPORTRECORDITEM_DRAWARGS* pDrawArgs, XTP_REPORTRECORDITEM_METRICS* pItemMetrics){

CTaskListView* pView = DYNAMIC_DOWNCAST(CTaskListView, pDrawArgs->pControl->GetParent());

if (!pView) return; == THIS LINE WAS MISSING

if (pView->GetReportCtrl().IsIconView())

 

You can get update of static app from same link as before



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


Posted By: keepITcool
Date Posted: 08 April 2009 at 12:22pm
Alas little relation, sorry for that. Regarding your icon method:  When i tried it I have a problem with the aligment of the edited text which shows up  double. I'll try to explain: The icon is right-aligned. The "original" text is left aligned, but when i press the dropdown the "edit text" is (LEFT!) indented for the width of the icon.
 
I'm new to the ReportControl. Evaluating migration from 10Tec's Igrid... looks very promising.
 


-------------
Xtreme :SuitePro (ActiveX) version 13.1.0
Language: VB 6.0
Platform: WinXP/Win7(32+64bit)


Posted By: mdoubson
Date Posted: 08 April 2009 at 2:39pm
It was already fixed bug (fixed couple days before only - Mike was a hero who found it!) - try run again from same link - now inplace editor properly located from very beginning of item rectangle. (Again - bug was not related to extra icon of item - in was wrong in-place editor positioning). Recebt ActiveX also has same fix 

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


Posted By: mdoubson
Date Posted: 08 August 2009 at 12:01pm
You can use now  new mode wndReportControl.PaintManager.ShowNonActiveInPlaceButton = True
all in-place controls setted as inside cell (e.g. use Column.EditOptions.AddComboButton True) will show inplacer always (in active and non-active mode)
No need for custom icons


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


Posted By: ReyesRP
Date Posted: 28 August 2009 at 9:32am

Was this also added to the MFC version? If so, in what version of the library? I'm not seeing it in the 13.1 CXTPReportPaintManager.

I have been using the icon / resize in-place control trick for years, but if that is now built in I can remove that code from my derived version of the control.
 
 


Posted By: ReyesRP
Date Posted: 28 August 2009 at 9:41am

Also, can you have both an icon and the in-place button then?

I seem to recall that in the pre-markup version of the control that you could only have one icon in a cell, so I used up that icon when I added the icon to represent the combo button.
 
So, now could I have a left aligned icon and the combo button shown in a cell at the same time?
 
I imagine this could be done with markup as well, but with schedules being what they are, I have not had time to experiment with that much...
 


Posted By: mdoubson
Date Posted: 28 August 2009 at 10:46am
It is 13.2 feature - look in current source updates  - https://forum.codejock.com/uploads/DemoVersion/ReportControlMFCUpdated.rar - https://forum.codejock.com/uploads/DemoVersion/ReportControlMFCUpdated.rar

-------------
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