... | @@ -168,3 +168,13 @@ If one inspects the code of ```initEventHandler()``` one can directly see the ha |
... | @@ -168,3 +168,13 @@ If one inspects the code of ```initEventHandler()``` one can directly see the ha |
|
}
|
|
}
|
|
|
|
|
|
```
|
|
```
|
|
|
|
The first part adds a listener to the vertical bar, **IF** it is available. Once we receive an event by the scrollbar we need to do two things:
|
|
|
|
|
|
|
|
1. save the position of the bar (the value is in lines of the editor) (this enables us to start drawing the line which is below the top visible offset)
|
|
|
|
2. and update the widget so that the correct text is displayed
|
|
|
|
|
|
|
|
Analogous we can inspect the listener to the horizontal scrollbar, we also notice two operations:
|
|
|
|
1. save the position of the scrollbar and store it in the variable ```leftMostPosition``` the value is this time given in pixel
|
|
|
|
2. update the widget so that the correct text is displayed
|
|
|
|
|
|
|
|
both bars are set invisible initially |