BUG: Ctrl+Click |
Post Reply |
Author | |
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
Posted: 15 June 2008 at 3:32pm |
I have a ReportControl with these settings:
The ReportControl has 2 records, and if the user presses Ctrl+Click on either record, the entire selection disappears (that is, no rows appear selected). I would think that the clicked row should be selected regardless of whether Ctrl is held when an item is clicked or not. Thanks. |
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
Smucker
Senior Member Joined: 02 February 2008 Status: Offline Points: 156 |
Post Options
Thanks(0)
|
I'm not very familiar with the report control, but Windows guidelines for extended selections cause Ctrl+Click to add or remove the clicked item from the list of selected items. It doesn't sound like this is happening.
|
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
Hi Smucker,
Thanks for the reply...I would expect this too happen if the MultipleSelection property was True, since then adding and removing items by Ctrl+Click would be required. With MultipleSelection=False, I expected the ReportControl to leave at least one item selected at all times (this is how the ListBox appears to behave in single selection mode), but perhaps I need to enforce this behaviour myself. Here's a workaround:
I tried a couple of other workarounds that I thought would be cleaner, but they failed for different reason. For example, recording only the Hit row in the MouseDown event when Ctrl has been pressed failed because it seems that SelectionChanged fires before MouseDown (strangely enough). A better method might be to use the GetCursorPos API to encapsulate all the logic in the SelectionChanged event. I've only just started using the ReportControl, and I'm surprised to see no SelectionChanging event (or BeforeSelectionChanged) with the ability to cancel the change...It would have been useful in this case (and in others that I can imagine). |
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
wlcabral
Groupie Joined: 25 April 2007 Location: Brazil Status: Offline Points: 72 |
Post Options
Thanks(0)
|
I´m using this code (MS FOXPRO) in MouseUp Event : With xTremeReportControl If NOT .multipleSelection oItem = .FocusedRow If !Isnull(oItem) oItem.Selected = True endif endif endwith
|
|
wlcabral
|
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
Hi wlcabral...Sorry I must have missed your post earlier. Thanks a lot for this trimmed down solution, it is very useful!
|
|
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
|
Post Reply | |
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 |