Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Column Click - how to trap left click action
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Column Click - how to trap left click action

 Post Reply Post Reply
Author
Message
mstuart View Drop Down
Groupie
Groupie


Joined: 06 April 2010
Location: United States
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote mstuart Quote  Post ReplyReply Direct Link To This Post Topic: Column Click - how to trap left click action
    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
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 12 October 2010 at 4:13pm
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 Wink
 
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....
Back to Top
mstuart View Drop Down
Groupie
Groupie


Joined: 06 April 2010
Location: United States
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote mstuart Quote  Post ReplyReply Direct Link To This Post Posted: 12 October 2010 at 5:02pm
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
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.172 seconds.