Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - Multiple ranged selection not working
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Multiple ranged selection not working

 Post Reply Post Reply Page  12>
Author
Message Reverse Sort Order
xcentric View Drop Down
Groupie
Groupie


Joined: 04 September 2008
Status: Offline
Points: 41
Post Options Post Options   Thanks (0) Thanks(0)   Quote xcentric Quote  Post ReplyReply Direct Link To This Post Topic: Multiple ranged selection not working
    Posted: 28 August 2009 at 11:31am
Originally posted by mdoubson mdoubson wrote:

This is result of columns with MinWidth > GivenWidth - in my case 100 and 80:


Yes, you are right, thanks.
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 28 August 2009 at 11:05am
>>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);

}

Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 28 August 2009 at 9:06am
I know it, please don't change your posts!
Sergio
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 28 August 2009 at 8:39am
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 
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 28 August 2009 at 4:22am
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
Back to Top
xcentric View Drop Down
Groupie
Groupie


Joined: 04 September 2008
Status: Offline
Points: 41
Post Options Post Options   Thanks (0) Thanks(0)   Quote xcentric Quote  Post ReplyReply Direct Link To This Post Posted: 28 August 2009 at 4:02am
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
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 28 August 2009 at 3:38am
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
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 27 August 2009 at 10:58pm
Also look on new feature - Report Control with resizable rows - select row and you can track down row height -
 
 
Menu - Help - Header-Footer turn this mode off
 
 
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 27 August 2009 at 1:17pm

OK - I fixed this case, rebuild static app and updated links from prev post (...Aug27) - people can get and try
 
// MOUSE

if (m_bBlockSelection) {

.........................
else
{

if (!pRow->IsSelected()) {

// Replace selected item

m_pSelectedRows->Select(pRow);

m_nSelectionStartingRow = nNewFocusedRow;

}

.........................
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 27 August 2009 at 11:36am
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
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 27 August 2009 at 11:17am
DD is drag and drop. Build yourself working app version and attach please
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 27 August 2009 at 11:15am
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
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 27 August 2009 at 11:06am
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
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 27 August 2009 at 10:54am
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
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 27 August 2009 at 10:48am
Thank you Sergio - i merged our recent modifications and now we can ask everybody to try before I wll update SVN -
 
 
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 27 August 2009 at 8:37am
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
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 27 August 2009 at 8:01am
OK. Done it works fine.

I am now preparing the sources to upload.
Sergio
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 27 August 2009 at 5:44am
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
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 27 August 2009 at 4:01am
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
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 26 August 2009 at 8:13pm
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)
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 26 August 2009 at 4:04pm
btw - i expect that you will confirm proper selection with group rows
 
 
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)

}

Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 26 August 2009 at 12:35pm
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
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 26 August 2009 at 11:44am
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
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 26 August 2009 at 11:08am
OK. I found how.
Sergio
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 26 August 2009 at 11:07am
OK. Standard Report Sample works with multiple selection.

How do I display header and footer ?
Sergio
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 26 August 2009 at 11:04am
How do I enable multiple selection mode ?

I need also to test with header and footer.
Sergio
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 26 August 2009 at 11:01am

You can use standard CJ sample code - it is enough to selection testing.

Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 26 August 2009 at 10:59am
Could you please give me the source code of your Report Static sample ?

Thank you.
Sergio
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 26 August 2009 at 9:15am
OK, thank you.

Now, I will try to manage the selection.
Sergio
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 26 August 2009 at 7:52am

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;

}

}

Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 26 August 2009 at 4:13am
Could you also give me some information about the class CXTPReportNavigator ?

In methods CXTPReportControl::SetFocusedRow(...), there is a call :

    GetNavigator()->SetMovePosition(pRow->GetType());
Sergio
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 26 August 2009 at 4:06am
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
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 25 August 2009 at 5:16pm
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
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 25 August 2009 at 4:26pm
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 25 August 2009 at 12:48pm
>>Here is another bug (Tree View test dialog) :
btw - keyboard selection for this case not skipped childs - please try.
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 25 August 2009 at 12:44pm

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

Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 25 August 2009 at 12:35pm
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
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 25 August 2009 at 12:22pm
Good idea - add it
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 25 August 2009 at 12:07pm
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
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 25 August 2009 at 11:49am
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
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 25 August 2009 at 11:48am
OK - you have fresh source - try to improve it please to implement your rule
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 25 August 2009 at 11:42am
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
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 25 August 2009 at 11:22am

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"

Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 25 August 2009 at 11:14am
Originally posted by Sergio Sergio wrote:

In the example https://forum.codejock.com/uploads/DemoVersion/ReportPaneViewStatic.rar (timestamp August, 20 - 15:00), this bug has resurrected :





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
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 20 August 2009 at 11:41pm
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 20 August 2009 at 11:23am

Can't confirm - my static (same as in link) - Aug 17, 18:10

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 20 August 2009 at 9:55am
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 20 August 2009 at 9:14am
In the example https://forum.codejock.com/uploads/DemoVersion/ReportPaneViewStatic.rar (timestamp August, 20 - 15:00), this bug has resurrected :



Sergio
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 20 August 2009 at 6:06am
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
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 17 August 2009 at 10:25am
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 17 August 2009 at 5:33am
Hello Mark,

I'm back !
Sergio
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 24 July 2009 at 3:05pm
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 24 July 2009 at 11:18am
The last timestamp is on file XTPReportRows.cpp : July 21, 2009.

XTPReportControl.cpp : July 20, 2009.

I'm leaving now.
Sergio
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 24 July 2009 at 10:16am
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....
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 24 July 2009 at 9:11am
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
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 21 July 2009 at 11:20am
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
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 21 July 2009 at 4:43am
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
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 21 July 2009 at 1:15am
Please get fresh updates - it works in both cases now: m_bSkipGroupsFocus = TRUE and m_bSkipGroupsFocus = FALSE
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 20 July 2009 at 1:27pm
>>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
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 20 July 2009 at 5:35am
Selection in sublevels (children selection when using groups) :


1) Two lines range




2) Multiple selection of blocs


Sergio
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 20 July 2009 at 4:39am
... no item should be unselected ... : OK

Bug when changing selection direction works better but there is still a problem :

Sergio
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 19 July 2009 at 10:39am
Originally posted by xcentric xcentric wrote:

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.

 
You right - this is not part of Report Control - this is app menu where we can check MarkUp case and do smth.
Thanks
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 18 July 2009 at 6:17pm
If you need some code modification - visit this post and leave your wish - https://forum.codejock.com/forum_posts.asp?TID=13834
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 17 July 2009 at 1:59pm
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 17 July 2009 at 11:42am
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.
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 17 July 2009 at 11:31am
New tests results :

  • OK : Click on expand/collapse button should not change selection or generate item click / double click events.

  • TO FIX : Multiple selection of blocs doesn't work for group child records.

  • TO FIX : 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).

  • OK : Horizontal scrollbar that was automatically hidden.

Sergio
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 17 July 2009 at 10:19am

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.rar
https://forum.codejock.com/uploads/DemoVersion/ReportSampleStaticExt.rar
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 17 July 2009 at 10:12am
Hi Mark,

Today I can consecrate some time to tests.

ReportSampleStaticProto tests results :

  • OK : Selection persistence for group childs seems to work perfectly.

  • TO FIX : Click on expand/collapse button should not change selection or generate item click / double click events.

  • TO FIX : Multiple selection of blocs doesn't work for group child records.

  • TO FIX : 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).



I will now check for horizontal scrollbar that is automatically hidden.

Regards,
Sergio
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 17 July 2009 at 1:02am
Back to Top
xcentric View Drop Down
Groupie
Groupie


Joined: 04 September 2008
Status: Offline
Points: 41
Post Options Post Options   Thanks (0) Thanks(0)   Quote xcentric Quote  Post ReplyReply Direct Link To This Post Posted: 16 July 2009 at 1:44pm
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.

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 15 July 2009 at 10:26pm
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 12 July 2009 at 12:17am
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 02 July 2009 at 11:16am
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?
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 02 July 2009 at 11:07am
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?)
 
 
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 02 July 2009 at 10:37am
this is why I propose you to use patch and we can fix fullcolumnscroll case faster using same code
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 02 July 2009 at 10:33am
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
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 02 July 2009 at 10:17am
You are doing smth sensless as scrolling code changed
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 02 July 2009 at 10:13am
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
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 02 July 2009 at 9:56am
Latest release is not that I mean - you need to get updates from https://forum.codejock.com/uploads/DemoVersion/ReportControlMFCUpdated.rar
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 02 July 2009 at 9:51am
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
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 02 July 2009 at 9:33am
I don't understand - are we using same code or not?
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 02 July 2009 at 9:27am
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
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 02 July 2009 at 9:00am
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
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 02 July 2009 at 6:02am
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
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 01 July 2009 at 5:02am
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
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 26 June 2009 at 4:26pm
 
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 -
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 26 June 2009 at 8:33am
Download OK. I will launch the setup on next Monday.
Sergio
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 26 June 2009 at 7:59am
OK, I will download it now!
Sergio
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 26 June 2009 at 6:43am
If you get recent official version of MFC code - you can start from here
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 26 June 2009 at 6:36am
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
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 26 June 2009 at 5:52am
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
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 22 June 2009 at 9:47pm
Hi, Sergio - are you ready to continue?
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 10 June 2009 at 1:24pm
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...
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 10 June 2009 at 5:18am
OK, I have to finish some work this week, I will try to do it on next week.
Sergio
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 08 June 2009 at 8:11am
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
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 08 June 2009 at 5:24am
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
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 05 June 2009 at 11:59am
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
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 05 June 2009 at 5:49am
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
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 05 June 2009 at 5:33am
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
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 05 June 2009 at 5:21am
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
Back to Top
 Post Reply Post Reply Page  12>
  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.250 seconds.