View Single Post
  #3  
Old 05-15-2009, 06:54 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
You can accomplish it like so..

PHP Code:
// In your GuiScrollCtrl put in a couple variables..
this.disabled true;
this.lastspos = {0,0};

// Then have the onScrolled function for that Ctrl
function yourScrollObj.onScrolled() {
  
temp.lastpos yourScrollObj.lastspos[0SPC yourScrollObj.lastspos[1];
  if (
yourScrollObj.scrollpos == lastpos) return; // To prevent unneeded changes.
  
if (yourScrollObj.disabled) {
    
temp.spos yourScrollObj.lastspos// Scroll's Last Scroll Position
    
yourScrollObj.scrollto(spos[0], spos[1]);
  }
  else 
yourScrollObj.lastspos yourScrollObj.scrollpos.tokenize();

I'm sure you could implement a generic event for it using catchevent and whatnot

Edit: Added a statement to prevent unneeded looping.
__________________
Quote:

Last edited by fowlplay4; 05-15-2009 at 11:07 PM..
Reply With Quote