Author |
Topic: Bug in scrollbar commands (Read 938 times) |
|
Richard Russell
Administrator
member is offline


Posts: 1348
|
 |
Re: Bug in scrollbar commands
« Reply #6 on: Oct 7th, 2016, 7:14pm » |
|
on Oct 7th, 2016, 6:02pm, tsh73 wrote: OK, so I added the boxfilled commands that the Bug Tracker recommends as a workaround - but it doesn't make any difference.
Quote:| Somehow I never seen "min" parameter other then 0 |
|
Hmm. So I changed the min parameter to 0, and now it works! But changing it from 0 to 1 breaks it; what's the point of having a parameter that you can't use? Is this another LB bug and is it documented?
Richard.
Code: nomainwin
WindowWidth = 332
WindowHeight = 356
UpperLeftX = 200
graphicbox #w.gb, 0, 0, 318, 318
open "Graphicbox scroll test" for window as #w
#w "trapclose [quit]"
#w.gb "vertscrollbar on 0 700"
#w.gb "horizscrollbar on 0 700"
#w.gb "down; size 4"
#w.gb "place 0 0; boxfilled 1000 1000"
#w.gb "line 0 0 1000 1000"
#w.gb "line 0 1000 1000 0"
#w.gb "flush"
UpperLeftX = 550
open "Graphics window scroll test" for graphics as #g
#g "trapclose [quit]"
#g "vertscrollbar on 0 700"
#g "horizscrollbar on 0 700"
#g "down; size 4"
#g "place 0 0; boxfilled 1000 1000"
#g "line 0 0 1000 1000"
#g "line 0 1000 1000 0"
#g "flush"
wait
[quit]
close #w
close #g
end
|
|
Logged
|
|
|
|
tsh73
Full Member
member is offline


Gender: 
Posts: 210
|
 |
Re: Bug in scrollbar commands
« Reply #7 on: Oct 7th, 2016, 7:37pm » |
|
The bug is one - scrollbar breaks graphics Drawing box before is a workaround. But it seems that you just found that it works only with min =0.
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline


Posts: 1348
|
 |
Re: Bug in scrollbar commands
« Reply #8 on: Oct 7th, 2016, 7:56pm » |
|
on Oct 7th, 2016, 7:37pm, tsh73 wrote:The bug is one - scrollbar breaks graphics Drawing box before is a workaround. But it seems that you just found that it works only with min =0. |
|
Looks to me like two different bugs. Setting the min to a non-zero value has a very different effect from omitting the boxfilled.
Richard.
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline


Posts: 1348
|
 |
Re: Bug in scrollbar commands
« Reply #9 on: Oct 8th, 2016, 09:42am » |
|
I've now corrected the LBB bug in my development version, and the fix will be incorporated in the next release (which, if I stick to the usual schedule, will be in December).
The compatibility implications are not too onerous. In the case of a GRAPHICBOX it's purely a cosmetic change: the 'scroll box' is now proportional (indicating how much of the total scrollable range is visible, as is usual for Windows scroll bars). There is no change in the way the min and max values are interpreted.
In the case of a Graphics Window there is a change in the way the max parameter is interpreted, to make it the same as a GRAPHICBOX (and to improve compatibility with LB 4) but the effect of the change is that the scroll range is increased, which is less serious than had it been the other way around.
Because a Graphics Window has scroll bars by default, it seems to me likely that the horizscrollbar and vertscrollbar commands will more commonly have been used with a GRAPHICBOX (which does not have scroll bars by default) thus reducing even further any negative impact from the change.
Richard.
|
|
|
|
|