Author |
Topic: Scrolling (Read 1204 times) |
|
nitwit
Guest
|
 |
Re: Scrolling
« Reply #4 on: May 24th, 2010, 5:46pm » |
|
VSCROLL works fine with MULTIWIN (even after I adapted it to do horizontal scrolling as well as vertical).
With SCROLL (to add a bit more info.), the sliders are the right size and do move but no scrolling takes place. The problem seems to be the line in MULTIWIN SYS"SetWindowLong"",@hwnd%,-4,M% (near the bottom of DEF_PROCmultwin(Q%). If I REM this, then scrolling works fine BUT printing to the 'other' windows goes wrong.
Any ideas before I revert to VSCROLL?
|
|
Logged
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: Scrolling
« Reply #5 on: May 24th, 2010, 9:56pm » |
|
on May 24th, 2010, 5:46pm, Guest-nitwit wrote:The problem seems to be the line in MULTIWIN SYS"SetWindowLong"",@hwnd%,-4,M% (near the bottom of DEF_PROCmultwin(Q%). If I REM this, then scrolling works fine |
|
You MUST NOT disable that line; it's fundamental to the correct operation of MULTIWIN. Indeed, don't ever mess around with the code in a library unless you understand exactly what it does.
Anyway, your problem is probably related to the fact that MULTIWIN disables the action of the @ox% and @oy% offsets, which SCROLL.BBC relies upon. Although it would be possible to modify MULTIWIN.BBC to enable those offsets, it's not straightforward.
Using MULTIWIN to create additional output windows whilst using the @ox%/@oy% offset facility on the main window is something I never envisaged! I've updated the library documentation to make the limitation clear:
http://www.bbcbasic.co.uk/bbcwin/manual/bbcwing.html#multiwin
You only need to use MULTIWIN if you are outputting standard BBC BASIC text or graphics to the child windows. If not, there are alternative ways to create child windows which won't interfere with the offsets. For example you could create them using WINLIB5, or use a dialogue box.
Of course, even if you decide to base your code on VSCROLL.BBC you can still have 'proportional' scroll bars of the sort that SCROLL.BBC provides. The style of scroll bar is unrelated to the method used for scrolling.
Richard.
|
| « Last Edit: May 24th, 2010, 9:59pm by admin » |
Logged
|
|
|
|
|