|
| Inicio → WINDEV 2024 → Sychronising vertical scroll position between Table and Schedule controls |
| Sychronising vertical scroll position between Table and Schedule controls |
| Iniciado por guest, 09,dic. 2014 03:19 - 2 respuestas |
| |
| | | |
|
| |
| Publicado el 09,diciembre 2014 - 03:19 |
Using WD19
As per the title, I am trying to synchronise the vertical scroll position between a table control and a scheduler control
I've currently got this code in the WM_VSCROLL event
ScrollbarPosition(CTPL_Schedule.SCH_Entity_Allocations,sbVert,ScrollbarPosition(TABLE_Available_Resources,sbVert))
Unfortunately it doesn't work too well.
Anyone have any other suggestions?
Rgds Paul |
| |
| |
| | | |
|
| | |
| |
| Publicado el 09,diciembre 2014 - 10:25 |
Hi Paul, I use the code below for that, because ScrollbarPosition wasn't there in WD17. (If I remember correctly Stephan again, who answered your other post, put me on this track...)
// move the scroll bar, to show the requested day nScroll is int = DateDifference(dStart,dShow) LOOP(nScroll) FOR i=1 TO nScrollbarDayTicks SendMessage(Handle(SCH_Planning),WM_VSCROLL,1,0) END END
where nScrollbarDayTicks = 102 This fixed value is working in my situation and determined by some trial-and-error. It move the scrollbar just enough to scroll one day. |
| |
| |
| | | |
|
| | |
| |
| Publicado el 10,diciembre 2014 - 03:54 |
| Thanks for you reply Arie. My problem was that you need the Table set to 'Move by Pixel' on scrolling in order for it to match the movement with the Schedule control. |
| |
| |
| | | |
|
| | | | |
| | |
|