YetAnotherForum
Welcome Guest Search | Active Topics | Log In | Register

How to stop RtActiveView scrolling? Options · View
ThePIman
#1 Posted : Thursday, August 13, 2009 1:23:07 PM
Rank: Member
Groups: Member

Joined: 5/14/2009
Posts: 28
Location: UK
I'm having trouble finding a way to stop a .pdi file loaded to SharePoint via RtActiveView from scrolling.
It doesn't have scroll bars but once the object is activated you can scroll up and down to your hearts content, quickly loosing whatever it is you're trying to display.

I guess there's probably a bit of code that could do this as .pdi files will use whatever code you embed, and I'm pretty sure you've probably come across this before ?

Hope you can help.

.
Sponsor  
 
RJK Solutions
#2 Posted : Friday, August 14, 2009 9:17:21 AM
Rank: Administration

Groups: Administration

Joined: 6/20/2008
Posts: 409
Location: Cheshire, United Kingdom.
Indeed there is some handy ProcessBook code for display files.

The following will turn the scrollbars off:

Code:
Private Sub Display_Open()
    Call SetScrollBars(pbOff, pbOff)
End Sub


Then as a safety net you can always set the view of the display when the user scrolls the display. There is an event "Scroll" that belongs to the Display object, so I would add:

Code:

Private Sub Display_Scroll(ByVal lLeft As Long, ByVal lTop As Long, ByVal lWidth As Long, ByVal lHeight As Long, ByVal lDeltaX As Long, ByVal lDeltaY As Long)
    Call SetViewPort(15000, -15000, ThisDisplay.ViewHeight, ThisDisplay.ViewWidth)
End Sub


This way, when a user tries to scroll it always stays in the top left of the display area. Obviously just tailor the position of the display and width/height as you need.

Enjoy.

Rhys.


OSIsoft PI System Specialists
PI consultancy on PI Systems, PISDK, AFSDK, OLEDB etc and PI custom developments. Well pretty much anything to do with PI!


ThePIman
#3 Posted : Monday, August 17, 2009 2:34:27 PM
Rank: Member
Groups: Member

Joined: 5/14/2009
Posts: 28
Location: UK
Applause

There's no scroll bars in the Active View web part so I guess that's for PB only, but the second code you offer should work a treat.


Cheers Dancing


*EDIT* Actually, it seems the first small bit of code did the trick nicely and now we don't loose the display Smile

.
RJK Solutions
#4 Posted : Wednesday, August 26, 2009 9:33:31 PM
Rank: Administration

Groups: Administration

Joined: 6/20/2008
Posts: 409
Location: Cheshire, United Kingdom.
Well there is always a nice bit of VBA code to do the job.
Glad it helped!


OSIsoft PI System Specialists
PI consultancy on PI Systems, PISDK, AFSDK, OLEDB etc and PI custom developments. Well pretty much anything to do with PI!


Users browsing this topic
Guest
Forum Jump  
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.