Column Click - how to trap left click action |
Post Reply |
Author | |
mstuart
Groupie Joined: 06 April 2010 Location: United States Status: Offline Points: 36 |
Post Options
Thanks(0)
Posted: 11 October 2010 at 7:49pm |
Hi all,
I'd like to duplicate the functionality of allowing the user to click on a Column, and set the Checkbox type rows to all checked. A lot of applications have this functionality, especially web apps like Yahoo Mail. If the user clicks on the column heading, it toggles the Check box to all rows checked. Clicking the Column heading again, unchecks the rows. Q: how do I capture the left click of a column heading and know which column was clicked so it doesn't interfere with the sorting for other columns? And then if it's the check box column, call a routine to toggle check the rows. |
|
Regards,
Mark Stuart Product: Xtreme SuitePro (ActiveX) v13.2.1 Platform: WinXP (32bit)/Win7 (64bit) Language: VB6 (SP6), Magic eDeveloper v9.4, uniPaaS v1.9 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
Use MouseDown event:
Private Sub wndReportControl_MouseDown(Button As Integer, Shift As Integer, x As Long, y As Long)
Dim extremeColumn As XtremeReportControl.ReportColumn Set extremeColumn = Me.wndReportControl.HitTest(x, y).Column If extremeColumn.ItemIndex = 0 Then Call MyOwnCheckBoxFunction 'or
If Me.wndReportControl.HitTest(x, y).Column.ItemIndex = 0 Then
Call MyOwnCheckBoxFunction End If End Sub
Some error handling should be added to above code just in case it fails somewhere
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
mstuart
Groupie Joined: 06 April 2010 Location: United States Status: Offline Points: 36 |
Post Options
Thanks(0)
|
Hi Aaron,
Thank you very much for the reply. After applying the 'or' option of your code, it didn't work for me. So I used the ReportHitTestInfo object to be returned and then I got the Column.ItemIndex from that object. Now it works. Regards, Mark Stuart
|
|
Regards,
Mark Stuart Product: Xtreme SuitePro (ActiveX) v13.2.1 Platform: WinXP (32bit)/Win7 (64bit) Language: VB6 (SP6), Magic eDeveloper v9.4, uniPaaS v1.9 |
|
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 |