Multiple ranged selection not working |
Post Reply | Page 12> |
Author | |
xcentric
Groupie Joined: 04 September 2008 Status: Offline Points: 41 |
Post Options
Thanks(0)
Posted: 28 August 2009 at 11:31am |
Yes, you are right, thanks. |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
>>2) Click between column 4 and column 5 on the header (just one mouse click)
>>3) You will see that column 4 has resized, but it should not What's happened if you click again in same place after resize done? No more resizing on click - right?.
This is result of columns with MinWidth > GivenWidth - in my case 100 and 80:
for (i = 0; i < COL_NUMBER; ++i)
{ columnStr.Format( "Column %d",i);CXTPReportColumn* pCol = GetReportCtrl().AddColumn( new CXTPReportColumn(i, columnStr, 80, FALSE,XTP_REPORT_NOICON,TRUE));pCol->EnableResize(TRUE); pCol->SetMinWidth(100); } |
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
I know it, please don't change your posts!
|
|
Sergio
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
No - this is my posts and if I consider that content (links) description is obsolete - I am changing it to match the current links content state - it make sense. I can't touch YOUR posts so don't worry
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
Could you please stop modifying previous posts that have already been replied ?
Your web site doesn't report any modified state or recent date for modification of any previous post. Thank you. |
|
Sergio
|
|
xcentric
Groupie Joined: 04 September 2008 Status: Offline Points: 41 |
Post Options
Thanks(0)
|
I have tested the sample https://forum.codejock.com/uploads/DemoVersion/ReportPaneViewStaticTrack.rar and found the issue:
1) Run the sample 2) Click between column 4 and column 5 on the header (just one mouse click) 3) You will see that column 4 has resized, but it should not |
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
I think that Drag'n'Drop will still not work, because we also need it if m_bBlockSelection is TRUE.
There is perhaps something to do with mouse up if m_bBlockSelection is TRUE and if the SHIFT & CTRL keys are up and if the clicked row is already selected. For now, I have something else to do, I will try to look later. |
|
Sergio
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
OK - I fixed this case, rebuild static app and updated links from prev post (...Aug27) - people can get and try
Current source updates here - so if you want to change something better start from this source -
// MOUSE
if (m_bBlockSelection) {
.........................
else
{
if (!pRow->IsSelected()) {
// Replace selected item
m_pSelectedRows->Select(pRow); m_nSelectionStartingRow = nNewFocusedRow; } .........................
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
Yes, confirmed. Simple mouse click, with SHIFT up and CTRL up, should check if the item is already selected and if this is the case, it should not change the selection...
|
|
Sergio
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
DD is drag and drop. Build yourself working app version and attach please
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
What do you mean with "DD" ?
When does it loose selection ? I have just tested the new selection with our projects, and I have just seen one small bug : the message "selection changed" is not generated for all cases. This is due to the method m_pSelectedRows->IsChanged() that is not working for all cases in SetFocusedRow(...). Please just force the "changed state" inside SetFocusedRow(...). ---------------------------------- ">>The Tree Dialog Test inside the same app is working perfectly - same in Aug 25 build - I already told you it" --> Yes, I knew it, I meant that that Codejock DLL contents was perfectly working on the Tree Dialog Test that you haven't modified. PLEASE STOP MODIFYING PREVIOUS POSTS! |
|
Sergio
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
NO - I make a build with all your changes to see the result. E.g. it loose selection now (try Pane app) - how to make DD?
I wanted to have some milestone state and this is that we have now.
I see now that you don't touch SelectBlock function - main logical working horse
>>The Tree Dialog Test inside the same app is working perfectly - same in Aug 25 build - I already told you it
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
Seems to work.
But your "https://forum.codejock.com/uploads/DemoVersion/ReportSampleStaticAug27.rar" has bad columns sizes and scrollbar behavior, and this is not due to my changes... ---> You removed it from your previous post. I added this comment on 28 August 2009, why the web site does not report it ? The Tree Dialog Test inside the same app is working perfectly. Please check... HAVE YOU FIXED YOUR METHOD "SelectBloc(...)" ? Have you read my comments of my previous post ? |
|
Sergio
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Thank you Sergio - i merged our recent modifications and now we can ask everybody to try before I wll update SVN -
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
Hi Mark,
Here are the 3 impacted files : XTPReportControl.h XTPReportControl.cpp XTPReportRows.cpp 20090827_081811_MultipleSelecti.zip Here is the differences report in HTML format (using Beyond Compare) : SergioChangesReport.zip 20090827_082034_SergioChangesRe.zip You will have to : - Fix your method SelectBlock(...) (See comments "----> Bugged method !"). Look at my temporary fix FixOfSelectBlock(...), and try to put your specific check in the commented line "//if (pRow->CanBeSelected())". - Don't use CXTPReportSelectedRows::m_nRowBlockBegin but better use CXTPReportControl::m_nSelectionStartingRow. You may rename it if you prefer. The class CXTPReportControl is now a friend class of CXTPReportSelectedRows. Look at my change in the file XTPReportRows.cpp. Regards, |
|
Sergio
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
OK. Done it works fine.
I am now preparing the sources to upload. |
|
Sergio
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
I did a temporary method to do a block of selection and now, it works much better :
void CXTPReportControl::FixOfSelectBlock(int nRowsType, int nStartingRow, int nEndingRow) I have done all cases for keyboard and mouse. I have one last point to do : remember correctly the starting range for keyboard and mouse. I will have to create a new member variable in CXTPReportControl like : int m_nSelectionStartingRow; // Starting row index of the last bloc of selection. |
|
Sergio
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
I confirm that children items are now correctly selected when selecting from one parent to another (having parents in expanded state).
---------------- I have finished to implement the SetFocusedRow(...) method, but it still doesn't work. After some debugging, I found that the method : void CXTPReportSelectedRows::SelectBlock(int nBlockBegin, int nEnd, BOOL bControlKey) does not work properly and is bugged. I think that this method does too much. Before doing anything else, I will do my own SelectBlock(...) for testing and finishing the selection behavior. |
|
Sergio
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Sergio - please get fresh source update - https://forum.codejock.com/uploads/DemoVersion/ReportControlMFCUpdated.rar
Today's modifications - DD with custom clippoard format and flag m_bSelectionExcludeGroupRows (see prev post)
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
btw - i expect that you will confirm proper selection with group rows
Check also old app - https://forum.codejock.com/uploads/DemoVersion/ReportSampleStatic-12-1.rar
Also please take attention to the end of function
void CXTPReportSelectedRows::SelectBlock(int nBlockBegin, int nEnd, BOOL bControlKey) {............................................
if (m_pControl->m_bSelectionExcludeGroupRows
m_pControl->UnselectGroupRows(); //this is the way to show only selected childs under group rows
//new flag - m_bSelectionExcludeGroupRows (default = TRUE - this is 12.1 way to show selection - witrhout group rows)
} |
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
2) ---> OK. Now all the selection behavior is handled in the method SetFocusedRow(...)
3) I am now able to fix the selection. Please note that : - When changing the focus from another group (header, body or footer) of selection, the selection of the previous group will be cleared and only the focused item in the new group will be selected (SHIFT or CTRL keys will be ignored in this case), because it is impossible to select a range starting from the header and ending to the footer! |
|
Sergio
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
1) I have routed the 1st function to the 2nd one :
BOOL CXTPReportControl::SetFocusedRow(CXTPReportRow* pRow, BOOL bControlKey) { return SetFocusedRow(pRow, FALSE, bControlKey); } BOOL CXTPReportControl::SetFocusedRow(CXTPReportRow* pRow, BOOL bShiftKey, BOOL bControlKey) { ... ---> It works. 2) I have tried to disable the "centralized code" of the selection : bEnableSelection = FALSE; // In SetFocusedRow(...) ---> It is still possible to select individual items using the CTRL+SPACEBAR keys or CTRL+left mouse click. ---> I have to move this external code inside the method SetFocusedRow(...), and I will perhaps have to create a third SetFocusedRow(...) method with more parameters (but at last, only one method will have all the code) |
|
Sergio
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
OK. I found how.
|
|
Sergio
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
OK. Standard Report Sample works with multiple selection.
How do I display header and footer ? |
|
Sergio
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
How do I enable multiple selection mode ?
I need also to test with header and footer. |
|
Sergio
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
You can use standard CJ sample code - it is enough to selection testing. |
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
Could you please give me the source code of your Report Static sample ?
Thank you. |
|
Sergio
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
OK, thank you.
Now, I will try to manage the selection. |
|
Sergio
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
void CXTPReportNavigator::SetMovePosition(XTPReportRowType RowType){ switch (RowType){ case xtpRowTypeBody: m_bCurrentFocusInHeadersRows = FALSE; m_bCurrentFocusInFootersRows = FALSE; break; case xtpRowTypeHeader: m_bCurrentFocusInHeadersRows = TRUE; m_bCurrentFocusInFootersRows = FALSE; break; case xtpRowTypeFooter: m_bCurrentFocusInHeadersRows = FALSE; m_bCurrentFocusInFootersRows = TRUE; break;} } |
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
Could you also give me some information about the class CXTPReportNavigator ?
In methods CXTPReportControl::SetFocusedRow(...), there is a call : GetNavigator()->SetMovePosition(pRow->GetType()); |
|
Sergio
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
There are two functions :
BOOL CXTPReportControl::SetFocusedRow(CXTPReportRow* pRow, BOOL bControlKey) and BOOL CXTPReportControl::SetFocusedRow(CXTPReportRow* pRow, BOOL bShiftKey, BOOL bControlKey) The 1st method have duplicate code, why does it not call the 2nd method with bShiftKey set to FALSE ? |
|
Sergio
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Centralized function you are looking for is BOOL CXTPReportControl::SetFocusedRow(CXTPReportRow* pRow, BOOL bShiftKey, BOOL bControlKey)
Check all places this function called and you will see it.
And to analyze CTRL + SHIFT case ... [A, B] X [C, D] ... to choose which segment to add to selection [B, X] or [X, C] -
we don't need direction flag as we have int CXTPReportSelectedRows::m_nRowBlockBegin
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Please get updates: no skipped childs for selection with group rows!
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
>>Here is another bug (Tree View test dialog) :
btw - keyboard selection for this case not skipped childs - please try. |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Sounds good - could you start it now if you have some time and I will contunie later when will have time (in the evening I guess) please? You can attach modified rar in Forum post |
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
If you don't know how to centralize this method, please place some comments in the code, like :
/*Selection Start*/ ... ... code ... ... /*Selection End*/ or /*Sergio Start*/ ... /*Sergio End*/ In all methods, code and member variables that are implied in selection management. Please do not forget any part and mark only code related to the selection behavior. Then upload the latest and commented source. The final goal is to have one centralized method that handle all selection cases. |
|
Sergio
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Good idea - add it
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
I can't implement my rule since the source is a little bugged.
I've looked to the code, and I don't understand why there is a "direction" of selection in the code. Moreover, the code is not well centralized, there isn't one clear method that handle the whole selection case, like : BOOL DoSelectionChange(int nNewlyFocusedRowIndex, BOOL bExtendTo /*if VK_SHIFT*/, BOOL bReplacePreviousSelection /*if not VK_CONTROL*/, BOOL bByMouse, BOOL bSpacebarPressed /*If not by mouse, if VK_SPACE pressed to switch row selection*/, BOOL bSendNotifyMessageToParent, BOOL bCallVirtualNotifyMembers, BOOL bUpdateDisplay) (Returns TRUE if the selection has changed) If you centralize the code, it will be easier to manage all cases. |
|
Sergio
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
Here is another bug (Tree View test dialog) :
https://forum.codejock.com/uploads/DemoVersion/ReportSampleStaticExt.rar - timestamp Aug 25, 17:15 and Aug 25, 17:47 |
|
Sergio
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
OK - you have fresh source - try to improve it please to implement your rule
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
I wrote :
>> When selecting with CTRL + SHIFT, no item should be unselected, this will avoid a bug when changing selection direction (3 blocs upward and one downward). That means that using the CTRL + SHIFT keys should select all the items in the range of the last two mouse clicks, and should not leave any unselected items in the range. |
|
Sergio
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Because you change direction - even you going from top to bottom or from bottom to top but not mix - this is that yourself use as one-directional selection - as you wrote "this will avoid a bug when changing selection direction" |
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
This bug is still present. Tested in files : https://forum.codejock.com/uploads/DemoVersion/ReportSampleStaticExt.rar - timestamp Aug 21, 18:05 and Aug 25, 17:10 https://forum.codejock.com/uploads/DemoVersion/ReportPaneViewStatic.rar - timestamp Aug 21, 18:05 and Aug 25, 17:10 |
|
Sergio
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Please get fresh updates - this is coming 3.2 version (beta now - so please run your tests and give your comments)
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Can't confirm - my static (same as in link) - Aug 17, 18:10 |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
In the example https://forum.codejock.com/uploads/DemoVersion/ReportPaneViewStatic.rar (timestamp August, 20 - 15:00), this bug has resurrected :
|
|
Sergio
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
Got https://forum.codejock.com/uploads/DemoVersion/ReportControlMFCUpdated.rar (timestamp August, 20 - 11:40), and cannot build the ToolKit :
... 1>XTPReportControl.cpp ...\codejock software\mfc\xtreme toolkitpro v13.1.0\source\reportcontrol\xt preportcontrol.cpp(5294) : error C2065: '_XTP_SCHEMA_1310' : undeclared identifi er ... ... 1>XTPReportColumn.cpp ...\codejock software\mfc\xtreme toolkitpro v13.1.0\source\reportcontrol\xt preportcolumn.cpp(306) : error C2065: '_XTP_SCHEMA_1310' : undeclared identifier ... |
|
Sergio
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Welcome back - get https://forum.codejock.com/uploads/DemoVersion/ReportControlMFCUpdated.rar
we now support vista-type DD - sorted DD
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
Hello Mark,
I'm back ! |
|
Sergio
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
https://forum.codejock.com/uploads/DemoVersion/ReportSampleStaticExt.rar (timestamp - July, 23 - 19:10)
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
The last timestamp is on file XTPReportRows.cpp : July 21, 2009.
XTPReportControl.cpp : July 20, 2009. I'm leaving now. |
|
Sergio
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Sergio - as a professional you should at least comment which version of app (with timestamp of exe) you use to testing? It can be already obsolete....
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
Hi Mark,
Starting from this evening I will be in holiday for three weeks. I had not enough time to further work on the selection. I noticed some strange behavior when selecting a range of rows starting from one child and ending to one child of another parent. Meanwhile, please be patient and see you in three weeks. Regards, |
|
Sergio
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Don't change direction - as you wrote "this will avoid a bug when changing selection direction"
You have access to all recent code - https://forum.codejock.com/uploads/DemoVersion/ReportControlMFCUpdated.rar - try to cover this case please
E.g. we can use same logic as for SHIFT + CONTROL case - if click inside [minSelection - maxSelection] range - ignore it if SHIFT pressed
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
Concerning my first post :
"Selection change direction" still need to be fixed. --------------------------------------- Concerning my second post : 1) Two lines selection range : OK 2) Children selection and SkipGroupsFocus : OK |
|
Sergio
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Please get fresh updates - it works in both cases now: m_bSkipGroupsFocus = TRUE and m_bSkipGroupsFocus = FALSE
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
>>When selecting with CTRL + SHIFT, no item should be unselected, this will avoid a bug when changing selection direction (3 blocs upward and one downward)
Thanks (should be < instead of <=) - try now please - https://forum.codejock.com/uploads/DemoVersion/ReportSampleStaticExt.rar >>Selection in sublevels (children selection when using groups) -
this is effect of m_bSkipGroupsFocus = TRUE; (CXTPReportControl::SkipGroupsFocus(TRUE))
if you use m_bSkipGroupsFocus = FALSE; (CXTPReportControl::SkipGroupsFocus(FALSE))
selection with childs working as well as no childs case mode selection
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
Selection in sublevels (children selection when using groups) :
1) Two lines range 2) Multiple selection of blocs |
|
Sergio
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
... no item should be unselected ... : OK
Bug when changing selection direction works better but there is still a problem : |
|
Sergio
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
You right - this is not part of Report Control - this is app menu where we can check MarkUp case and do smth.
Thanks
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
If you need some code modification - visit this post and leave your wish - https://forum.codejock.com/forum_posts.asp?TID=13834
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
1 >>Multiple selection of blocs doesn't work for group child records - What do you mean?
Consider that group row is not selectable - you can select most deep childs - on individual or multiple (inside same child set) base.
Under such conditions you still think that there is something wrong?
We can make selection with group row (if it allow focus - there is flag m_pReportControl->IsSkipGroupsFocusEnabled() with default = TRUE) later.
2 CTRL + SHIFT case - do you test keyboard-only selection in this case (compare with Windows Explorer please)? For mouse case - yes need to prevent unselection.
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
New tests results :
|
|
Sergio
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Thanks for testing but you get intermidiate stage - try again - same links (support multiple column set in group box) https://forum.codejock.com/uploads/DemoVersion/ReportControlMFCUpdated.rarhttps://forum.codejock.com/uploads/DemoVersion/ReportSampleStaticExt.rar |
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
Hi Mark,
Today I can consecrate some time to tests. ReportSampleStaticProto tests results :
I will now check for horizontal scrollbar that is automatically hidden. Regards, |
|
Sergio
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Persist selection for group childs - https://forum.codejock.com/uploads/DemoVersion/ReportSampleStaticExt.rar
|
|
xcentric
Groupie Joined: 04 September 2008 Status: Offline Points: 41 |
Post Options
Thanks(0)
|
Mark, I have tested your fresh demo.
Just in case you had not seen it: 1) General -> Show Markup Sample 2) Right-Click on the header -> Columns You will see a markup code instead of a column name. |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Fresh demo with persist child selection here - https://forum.codejock.com/uploads/DemoVersion/ReportSampleStaticProto.rar
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Get fresh update with good selection - https://forum.codejock.com/uploads/DemoVersion/ReportControlMFCUpdated.rar
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Sergio - why don't you open the issue and we can work together to fix your problem and same time release result for all users?
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
uploads/20090702_111440_ReportDialogSam.rar
This is simple sample with many columns - working fine with autosizing and not autosizing mode
and FullColumnScrolling with not autosizing
but need to fix FullColumnScrolling + AutoSizing case (if such mode have some sense?)
You can try static exe https://forum.codejock.com/uploads/DemoVersion/ReportDialogSampleStatic.rar
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
this is why I propose you to use patch and we can fix fullcolumnscroll case faster using same code
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
Could you please be more precise ?
That's not senseless, we will distribute our products with the latest official release of Codejock, the 13.1.0, which doesn't seem to be working. |
|
Sergio
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
You are doing smth sensless as scrolling code changed
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
OK, you tried to fix it and now I should check it by using your latest source code.
I can't do it now, it take time to change my environment, I will test it when I will test the multiple selection. Please wait one or three days, thank you. |
|
Sergio
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Latest release is not that I mean - you need to get updates from https://forum.codejock.com/uploads/DemoVersion/ReportControlMFCUpdated.rar
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
I am using the Toolkit Pro of the latest release (13.1.0) to test my code.
Your sample cannot be modified to carry more columns because it's an executable. Here is the case : each column counts for approx. 10 pixels, multiply this number with the number of columns, and now reduce the width of the report control to be lower than this number. |
|
Sergio
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
I don't understand - are we using same code or not?
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
It doesn't occur in your sample, because you don't have as much columns as we have (approx. 100). It's working fine with a few columns.
Please try to add 100 columns in your sample. |
|
Sergio
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Please re-build using recent updates and confirm as I don't have such effect. Could you reproduce it on
https://forum.codejock.com/uploads/DemoVersion/ReportSampleStatic.rar
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
Hi Mark,
In the release 13.1.0, the resizing of the Report Control behaves differently. When using the full column scrolling mode and when the control reaches a certain low limit, the control is automatically switched to a non-full column scrolling mode (the horizontal scrollbar is automatically hidden). How can we now avoid that ? |
|
Sergio
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
Hi Mark,
Thank you for having included all the small enhancements. I am currently using your release version 13.1.0 and successfully built one of our projects. I will keep you informed as soon as I have tested your ReportControlMFCUpdated.rar files. Best regards, |
|
Sergio
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
I think that all or almost all related to rows selection and records move I already fixed but I don't have testers to check all possible test-cases so please check modified code and run different cases based on your app or our sample - including drag'n drop cases. Thanks
Most recent updates here -
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
Download OK. I will launch the setup on next Monday.
|
|
Sergio
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
OK, I will download it now!
|
|
Sergio
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
If you get recent official version of MFC code - you can start from here
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
My manager is asking me to evaluate how much time it will take. I need your latest files to estimate the work load.
Please note that any intermediary merge take time, I would appreciate if we could avoid them. |
|
Sergio
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
Hi Mark,
I don't know, I'm waiting for a response from my manager. Meanwhile, could you please fix this method in the CXTResize::Size() : void CXTResize::Size() { if (m_arrItems.GetSize() > 0) { CSize szWindow = CXTPClientRect(m_pWnd).Size(); if (szWindow.cx == 0 || szWindow.cy == 0) return; ////////////////////////// // New Code - Begin - take care of limits if (m_szMin.cx != 0) szWindow.cx = max(m_szMin.cx, szWindow.cx); if (m_szMin.cy != 0) szWindow.cy = max(m_szMin.cy, szWindow.cy); if (m_szMax.cx != 0) szWindow.cx = min(m_szMax.cx, szWindow.cx); if (m_szMax.cy != 0) szWindow.cy = min(m_szMax.cy, szWindow.cy); // New Code - End - take care of limits ////////////////////////// AjustResizeRect(szWindow); CSize szDelta = szWindow - m_szWindow; HDWP hDWP = ::BeginDeferWindowPos((int)m_arrItems.GetSize()); ... We are using this class for a child window (no WM_GETMINMAXINFO). Thank you in advance, Regards. |
|
Sergio
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Hi, Sergio - are you ready to continue?
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
OK - let's finish it later. I also busy now and this "bug" is minor - if user can't make desired selection using one way - he can do it using another way...
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
OK, I have to finish some work this week, I will try to do it on next week.
|
|
Sergio
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Deadlines as always - yesterday, in current case this is not a figure of speech but pure true. Release should be today. But you can try to fix your vision of selection - if it will be good and work properly in all cases - I will try to use it. Look on current state in static app - refreshed but keeped same link
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
I would really like to continue my fix, but my manager is asking me to continue internal jobs.
I have given you the complete selection cases. To finish completely the selection behavior, I need at least 2 days (to rollback to blocks of selection and change SetFocusedRow(...), OnLButtonDown/Up(...) and OnKeyDown(...)). What are your deadlines for this Release ? |
|
Sergio
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
OK - you proposed your help and now you refused to finish with comments about pay - so I will ignore you changes and will do my own implementation later as now we are going to release version and I have no time (the reason I agree for your help) to fix old wrong design - only improve it little bit
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
For the external scrollbars, if you keep the last code I sent you, and change this :
void CXTPReportView::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) { if (m_pScrollBarHor && pScrollBar == m_pScrollBarHor) { if (nSBCode == SB_THUMBTRACK || nSBCode == SB_THUMBPOSITION) { nPos = pScrollBar->GetScrollPos(); GetReportCtrl().SetScrollPos(SB_HORZ, nPos, FALSE); } GetReportCtrl().OnHScroll(nSBCode, nPos, NULL); } CView::OnHScroll(nSBCode, nPos, pScrollBar); } void CXTPReportView::OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) { if (m_pScrollBar && pScrollBar == m_pScrollBar) { if (nSBCode == SB_THUMBTRACK || nSBCode == SB_THUMBPOSITION) { nPos = pScrollBar->GetScrollPos(); GetReportCtrl().SetScrollPos(SB_VERT, nPos, FALSE); } GetReportCtrl().OnVScroll(nSBCode, nPos, NULL); } CView::OnVScroll(nSBCode, nPos, pScrollBar); } It should work. |
|
Sergio
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
Please note that I have no more time to consecrate to this task, I have to do my own job. I will still check your samples .exe and your feedbacks, but I must now switch back to my development environment. Please kindly note that you don't pay us for this task, we do it...
If you get back to block selection, don't forget to put the code back to the methods _OnExpanded()/_OnCollapsed()... Thank you. |
|
Sergio
|
|
Sergio
Senior Member Joined: 18 September 2006 Status: Offline Points: 216 |
Post Options
Thanks(0)
|
For the VirtualMode, you're right, we should keep using blocks. But at the time I wrote my code, selection blocks had in some cases redundancies. I saw that you made some changes between the time, did you fix that? Although CXTPReportSelectedRows could manage both selections (per elements and per blocks), we perhaps better stay using one method, the block one.
Here's what I'm trying to do for the selection : CXTPReportSelectedRows // To simplify CXTPReportRows* retrieval // Not implemented yet! CXTPReportRows* GetRowTypeRows() // Checks and adjust the selection range // Return FALSE if there are no rows in the block range BOOL _CheckBlockRange(int nRowsCount, int& ib, int& ie); // Checks if the selection would change from current BOOL WillSelectionChange(int& ib, int& ie, BOOL bSelect); // Centralized method that handle all cases and that should be called for every changes in the selection // In this method, we check the range, and we know if we are clearing the selection, changing the selection of only one item, ... // Should return TRUE if the selection has changed from current, if not, return FALSE and do not notify or redraw BOOL ChangeSelection(int& ib, int& ie, BOOL bSelect, BOOL bNotify, BOOL bRedraw); CXTPReportControl Keyboard events or mouse events should call a centralized method to manage the selection. // To know from where we extend the selection // Used for mouse and keyboard // -1 = no selection extend = no item previously selected int m_nSelExtendStartingRowIndex = -1; // Centralized method to manage the selection // All the checks must be made in this method // Returns TRUE if the selection has changed, to be able to notify or update display later BOOL DoSelectionChange(int nNewlyFocusedRowIndex, BOOL bExtendTo /*if VK_SHIFT*/, BOOL bReplacePreviousSelection /*if not VK_CONTROL*/, BOOL bByMouse, BOOL bSpacebarPressed /*If not by mouse, if VK_SPACE pressed to switch row selection*/, BOOL bNotify, BOOL bUpdateDisplay) Implementation : // Keyboard - bByMouse=FALSE // Always do this check and change if m_nSelExtendStartingRowIndex==-1 and bSpacebarPressed!=TRUE then bExtendTo=FALSE if bSpacebarPressed==FALSE if bExtendTo==FALSE and bReplacePreviousSelection==TRUE then clear the selection and select nNewlyFocusedRowIndex and m_nSelExtendStartingRowIndex=nNewlyFocusedRowIndex if bExtendTo==TRUE and bReplacePreviousSelection==TRUE then clear the selection and select bloc from m_nSelExtendStartingRowIndex to nNewlyFocusedRowIndex do not change m_nSelExtendStartingRowIndex! if bExtendTo==FALSE and bReplacePreviousSelection==FALSE then set only the FOCUS CARET to nNewlyFocusedRowIndex and m_nSelExtendStartingRowIndex=nNewlyFocusedRowIndex Do not make any change to the selection ! if bExtendTo==TRUE and bReplacePreviousSelection==FALSE then select bloc from m_nSelExtendStartingRowIndex to nNewlyFocusedRowIndex do not change m_nSelExtendStartingRowIndex! if bSpacebarPressed==TRUE if bExtendTo==FALSE and bReplacePreviousSelection==TRUE then do nothing ! if bExtendTo==TRUE and bReplacePreviousSelection==TRUE then do nothing ! if bExtendTo==FALSE and bReplacePreviousSelection==FALSE then invert the selection of nNewlyFocusedRowIndex and m_nSelExtendStartingRowIndex=nNewlyFocusedRowIndex if bExtendTo==TRUE and bReplacePreviousSelection==FALSE then clear the selection and select nNewlyFocusedRowIndex and m_nSelExtendStartingRowIndex=nNewlyFocusedRowIndex // Mouse - bByMouse=TRUE // Always do this check and change if m_nSelExtendStartingRowIndex==-1 then bExtendTo=FALSE if bExtendTo==FALSE and bReplacePreviousSelection==TRUE then clear the selection and select nNewlyFocusedRowIndex and m_nSelExtendStartingRowIndex=nNewlyFocusedRowIndex if bExtendTo==TRUE and bReplacePreviousSelection==TRUE then clear the selection and select bloc from m_nSelExtendStartingRowIndex to nNewlyFocusedRowIndex do not change m_nSelExtendStartingRowIndex! if bExtendTo==FALSE and bReplacePreviousSelection==FALSE then invert the selection of nNewlyFocusedRowIndex and m_nSelExtendStartingRowIndex=nNewlyFocusedRowIndex if bExtendTo==TRUE and bReplacePreviousSelection==FALSE then select bloc from m_nSelExtendStartingRowIndex to nNewlyFocusedRowIndex do not change m_nSelExtendStartingRowIndex! It's a little difficult to know how the code in the Codejock ToolKitPro works, but I think this will help ! |
|
Sergio
|
|
Post Reply | Page 12> |
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 |