Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Canceling a click
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Canceling a click

 Post Reply Post Reply
Author
Message
Shawshank View Drop Down
Senior Member
Senior Member


Joined: 16 October 2005
Status: Offline
Points: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote Shawshank Quote  Post ReplyReply Direct Link To This Post Topic: Canceling a click
    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
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  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.141 seconds.