1. Horizontal or Vertical Scroll event?
- Posted by petelomax at blueyonder.co.uk Sep 19, 2002
- 521 views
{{{ I've tracked a bug down to the following snippet of code (from Mike's Editor):
procedure onScroll_MAIN( integer pos) if pos ! oldvscroll and getVScrollPos(MAIN) = pos then scrollVertical(pos) elsif getHScrollPos(MAIN) pos then scrollHorizontal(pos) end if end procedure onScroll[MAIN] routine_id("onScroll_MAIN")
The trouble is it should be calling ScrollVertical but it is calling ScrollHorizontal. The file is positioned at (1,1) pos is 1. oldvscroll is 1. oldhscroll is 1. getVScrollPos(MAIN) returns 1. getHScrollPos returns 1.
I tried findChildren(MAIN) but no HScroll or VScroll controls appear to be returned. getSelf() always returns MAIN.
The original create(HScroll...) lines have been removed and replaced with MAIN createEx ( Window, "", 0, left, top,windowWidth, windowHeight, {WS_THICKFRAME, WS_SYSMENU, WS_MINIMIZEBOX, WS_MAXIMIZEBOX, WS_HSCROLL, WS_VSCROLL, {WS_EX_CLIENTEDGE} )
Is there any way to determine if it is a horizontal or vertical scroll event in that case?
I'm actually using v0.55.5, but I tested v0.57.9 and got the same.
Pete
2. Re: Horizontal or Vertical Scroll event?
- Posted by Derek Parnell <ddparnell at bigpond.com> Sep 19, 2002
- 545 views
The Horizontal scroll bar has only been supported since v0.57.10BETA. You can try out the latest BETA release at ... http://www.users.bigpond.com/ddparnell/euphoria/w3205711.zip Please read the docs for details. 20/09/2002 10:49:34 AM, petelomax at blueyonder.co.uk wrote: I've tracked a bug down to the following snippet of code (from Mike's >Editor): > >procedure onScroll_MAIN( integer pos) > if pos != oldvscroll and getVScrollPos(MAIN) = pos then > scrollVertical(pos) > elsif getHScrollPos(MAIN) = pos then > scrollHorizontal(pos) > end if > end procedure > onScroll[MAIN] = routine_id("onScroll_MAIN") > >The trouble is it should be calling ScrollVertical but it is calling >ScrollHorizontal. The file is positioned at (1,1) pos is 1. oldvscroll >is 1. oldhscroll is 1. getVScrollPos(MAIN) returns 1. getHScrollPos >returns 1. > >I tried findChildren(MAIN) but no HScroll or VScroll controls appear >to be returned. getSelf() always returns MAIN. > >The original create(HScroll...) lines have been removed and replaced >with MAIN = createEx ( Window, "", 0, left, top,windowWidth, >windowHeight, {WS_THICKFRAME, WS_SYSMENU, WS_MINIMIZEBOX, >WS_MAXIMIZEBOX, WS_HSCROLL, WS_VSCROLL}, {WS_EX_CLIENTEDGE} ) > >Is there any way to determine if it is a horizontal or vertical scroll >event in that case? > >I'm actually using v0.55.5, but I tested v0.57.9 and got the same. > >Pete Derek Parnell ICQ# 7647806
3. Re: Horizontal or Vertical Scroll event?
- Posted by petelomax at blueyonder.co.uk Sep 20, 2002
- 487 views
{{{ I solved my problem with the following lovely bit of code:
integer iknowwhatimdoin iknowwhatimdoin=0 ... iknowwhatimdoinVScroll setVScrollPos(MAIN, pos) iknowwhatimdoin=0 ... iknowwhatimdoinHScroll setHScrollPos(MAIN, pos) iknowwhatimdoin=0
procedure onScroll_MAIN( integer pos) if iknowwhatimdoin=VScroll or HScrollON=False then scrollVertical(pos) elsif iknowwhatimdoinHScroll then scrollHorizontal(pos) else idontknowsoillguess then elsif pos != oldvscroll and getVScrollPos(MAIN) = pos then scrollVertical(pos) elsif getHScrollPos(MAIN) = pos then scrollHorizontal(pos) end if end procedure onScroll[MAIN] = routine_id("onScroll_MAIN")
I just spent about 18 hours to get it to work, so it looks lovely to me anyway!
Pete