Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Remove selection from focused row
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Remove selection from focused row

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


Joined: 19 April 2005
Location: Germany
Status: Offline
Points: 124
Post Options Post Options   Thanks (0) Thanks(0)   Quote mlatona Quote  Post ReplyReply Direct Link To This Post Topic: Remove selection from focused row
    Posted: 01 September 2005 at 8:38am

How can I remove the selection and the rectangle from the focused row?

Following code don`t works (VB6): Set ReportControl.FocusedRow = Nothing

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

Joined: 11 June 2004
Status: Offline
Points: 167
Post Options Post Options   Thanks (0) Thanks(0)   Quote nighthawk Quote  Post ReplyReply Direct Link To This Post Posted: 02 September 2005 at 2:12am
As far as I can tell, there unfortunately isn't a single setting to disable being able to select records.  I've come up with my own way.

The most effective way to not make anything rows selectable is by defining a mouse down event and setting the focus of another control:

Private Sub ReportControl_MouseDown(Button As Integer, Shift As Integer, X As Long, Y As Long)
    SomeOtherControl.SetFocus
End Sub

The "SomeOtherControl" can be just about any other visible control on the form.


If you just wanted to hide the selection box, you could do:

ReportControl.PaintManager.HighlightBackColor = ReportControl.PaintManager.BackColor
ReportControl.PaintManager.HighlightForeColor = ReportControl.PaintManager.ForeColor

The focus rectangle will still appear however.
Back to Top
mlatona View Drop Down
Senior Member
Senior Member


Joined: 19 April 2005
Location: Germany
Status: Offline
Points: 124
Post Options Post Options   Thanks (0) Thanks(0)   Quote mlatona Quote  Post ReplyReply Direct Link To This Post Posted: 05 September 2005 at 10:07am
When I fill the report control and show the data with the populate method, the focused row property have an undefined (nothing) value and no row have the focus. When I set the focusedrow property to nothing, I will this behaviour that no row have the focus. And not with the workaround, that I set the highlightbackcolor property or delete the focusedrow from the selectedrows property.
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.189 seconds.