Print Page | Close Window

Remove selection from focused row

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=2829
Printed Date: 25 April 2024 at 8:06pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Remove selection from focused row
Posted By: mlatona
Subject: Remove selection from focused row
Date 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




Replies:
Posted By: nighthawk
Date 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.


Posted By: mlatona
Date 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.



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