Print Page | Close Window

Canceling a click

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=7522
Printed Date: 07 June 2024 at 9:51am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Canceling a click
Posted By: Shawshank
Subject: Canceling a click
Date Posted: 04 July 2007 at 1:39am
I have a RC with a list of items. Each time a user selects an item it becomes highlighted. In some cases I need to cancel a user's click or selection. In these cases I need the item that the user clicked to NOT become highlighted. Instead, I need the item that was holding focus to remain selected. I can't seem to find a way to cancel this new selection. I have tried adding a timer to the form and then keeping up with which item is selected. When I encounter a need to cancel the selection I use the following code to attempt to override the new selection taking place:
 
RC.Rows.Row(iRowSelection).Selected = True
 
RC.Populate
 
This code is in the timer event. Unfortunately, it doesn't maintain the selection. I see that the proper value is in iRowSelection and that the code executes yet the RC "overrides" me and makes the new selection anyway. Is there a way to stop this behavior when one needs to?
 
Shawshank



Replies:
Posted By: sserge
Date Posted: 05 July 2007 at 3:48pm
Hi,

Something like this works for me:

Private Sub wndReportControl_MouseUp(Button As Integer, Shift As Integer, x As Long, y As Long)
    wndReportControl.SelectedRows.Row(0).Selected = False
End Sub


--
WBR,
Serge



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net