SOLVED: Scrollbar Event |
Post Reply |
Author | |
ElvisM
Senior Member Joined: 12 October 2006 Location: Venezuela Status: Offline Points: 129 |
Post Options
Thanks(0)
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 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
ElvisM
Senior Member Joined: 12 October 2006 Location: Venezuela Status: Offline Points: 129 |
Post Options
Thanks(0)
|
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..
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
ElvisM
Senior Member Joined: 12 October 2006 Location: Venezuela Status: Offline Points: 129 |
Post Options
Thanks(0)
|
Hi, this is the screenshot. |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
ElvisM
Senior Member Joined: 12 October 2006 Location: Venezuela Status: Offline Points: 129 |
Post Options
Thanks(0)
|
aaron, thank you a lot!!!
This work!!!!
Regards.
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
ElvisM
Senior Member Joined: 12 October 2006 Location: Venezuela Status: Offline Points: 129 |
Post Options
Thanks(0)
|
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.
|
|
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 |