Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - SOLVED: Scrollbar Event
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

SOLVED: Scrollbar Event

 Post Reply Post Reply
Author
Message
ElvisM View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 October 2006
Location: Venezuela
Status: Offline
Points: 129
Post Options Post Options   Thanks (0) Thanks(0)   Quote ElvisM Quote  Post ReplyReply Direct Link To This Post Topic: SOLVED: Scrollbar Event
    Posted: 03 June 2008 at 7:42pm

Hi friends.

Eexcuse me by my english, is so basic.

There's a way to capture the event when the user is using the scrollbar?

 
regards,
Elvis
Product: Xtreme SuitePro (ActiveX) version 17.2
Platform: Windows 10 64bits
Language: Visual Basic 2015
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: 04 June 2008 at 1:53am
Hi,
 
Sorry, there's no event.
 
You could use your own scrollbars:
 
wndReportControl.SetScrollBars ScrollBarHorizontal.hwnd, ScrollBarVertical.hwnd
 
and have the scroll_change events.
 
 
If I may ask, why do you need this?
 
 
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
ElvisM View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 October 2006
Location: Venezuela
Status: Offline
Points: 129
Post Options Post Options   Thanks (0) Thanks(0)   Quote ElvisM Quote  Post ReplyReply Direct Link To This Post Posted: 04 June 2008 at 12:20pm
Because, I'm simulating a merge cell's using labels in te top of the reporcontrol. I need move the labels when the user moves the horizontal scrollbar, but if I can't capture this event... :-(
 
Sorry by my english..
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: 04 June 2008 at 12:52pm
Hi,
 
Can you upload a sample project?
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
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 04 June 2008 at 1:54pm
Here's a sample that subclasses the child window of the ReporControl to capture WM_HSCROLL (horizontal scroll) messages. It doesn't do much (just notifies you that the horizontal scrollbar position has changed by printing "HORIZONTAL SCROLL" to the debug window), so you will have to do some additional work.


uploads/20080604_135002_SubclassReportC.zip

IMPORTANT NOTE ABOUT SUBCLASSING: If you set a breakpoint in your code (or press Ctrl+Break) while a control is subclassed, you will likely crash your entire VB IDE and lose all your work, so make sure to SAVE OFTEN! This is just a demonstration of the technique, but I highly recommend you use a safe subclassing control (or roll your own by compiling the code into a DLL). There's a good one for free here:

http://www.vbaccelerator.com/home/VB/Code/Libraries/Subclassing/SSubTimer/article.asp

And you can see in this example how they get more detailed information about the scrollbar position/scroll direction:

http://www.vbaccelerator.com/home/Vb/Code/Controls/S_Grid/VB6_Full_Source_Code_zip_cScrollBars_cls.asp

Good luck!
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

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: 04 June 2008 at 2:06pm
Originally posted by jpbro jpbro wrote:

Here's a sample that subclasses the child window of the ReporControl to capture WM_HSCROLL                Good luck!
 
Hi, and Good luck you will need
 
Think you are better of with my option (at least try it first)
 
Elvis, give me at least a screenshot of what you are trying to do
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
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 04 June 2008 at 2:36pm
Oh subclassing is not so bad once you get used to it ;)
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

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: 04 June 2008 at 2:56pm
Originally posted by jpbro jpbro wrote:

Oh subclassing is not so bad once you get used to it ;)
 
Hi,
 
Yeah right, subclassing is also inheriting the monday morning implementations  I let CJ do the subclassing and if there's something not working as expected then I will use the issue tracker
 
 
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
ElvisM View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 October 2006
Location: Venezuela
Status: Offline
Points: 129
Post Options Post Options   Thanks (0) Thanks(0)   Quote ElvisM Quote  Post ReplyReply Direct Link To This Post Posted: 04 June 2008 at 5:17pm

Hi, this is the screenshot.

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: 05 June 2008 at 1:27am
Hi,
 
Of course we don't need Subclassing  
 
 
 
Maybe it needs a little tuning for your needs  
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
ElvisM View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 October 2006
Location: Venezuela
Status: Offline
Points: 129
Post Options Post Options   Thanks (0) Thanks(0)   Quote ElvisM Quote  Post ReplyReply Direct Link To This Post Posted: 06 June 2008 at 11:41am
aaron, thank you a lot!!!
This work!!!!
 
Regards.
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: 10 June 2008 at 4:54am
Hi,
 
You could add CJ labels and set MarkUp.Enabled = true
and have the labels like this:
 
 
 
 
 
 
Private Function SetMarkupLabels(lbl As XtremeSuiteControls.Label)
lbl.Caption = _
"<Border xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'" & _
    "VerticalAlignment='Center' HorizontalAlignment='Center' BorderThickness='1' BorderBrush='#767676' MinHeight='" & lbl.Height / Screen.TwipsPerPixelY & "' MinWidth='" & lbl.Width / Screen.TwipsPerPixelX & "'>" & _
        "<Border.Background>" & _
        "<LinearGradientBrush StartPoint='0,0' EndPoint='0,1'>" & _
            "<GradientStop Color='white' Offset='0.0'/>" & _
            "<GradientStop Color='lightblue' Offset='1.0'/>" & _
        "</LinearGradientBrush>" & _
        "</Border.Background>" & _
        "<StackPanel>" & _
        "<TextBlock HorizontalAlignment='center' Foreground='Black' FontSize='16' FontWeight='Bold' FontFamily='Tahoma' Text='" & lbl.ToolTipText & "'/>" & _
        "</StackPanel>" & _
    "</Border>"
   
End Function
 
 
There are a lot of (visual) options when doing it like this. I just put it together to give you an idea. The text in the label is the tooltiptext of the label
 
 
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
ElvisM View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 October 2006
Location: Venezuela
Status: Offline
Points: 129
Post Options Post Options   Thanks (0) Thanks(0)   Quote ElvisM Quote  Post ReplyReply Direct Link To This Post Posted: 10 June 2008 at 10:50am

Good job Aaron.

Thank you.

But, is very very necessary that the Codejock includes the mergecell option into the reportcontrol. This is a critical feature. And is very usefull for the programmers.

 

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.297 seconds.