scrollbar bug
Ray G. Miller
rgmiller at pacbell.net
Fri Aug 22 17:15:00 EDT 2003
Listers,
Have a possible bug in the scrollbars.
I have a window which displays thumbnail size pix 2 columns by 3 rows:
six pictures are displayed at one time.
The user can "mark" any pix by a checkBox under each picture. He can
then switch between the main database and the marked list by flipping a
toggle.
The problem is than if the user selects less than 7 pix, flips to the
marked list and then back to the main list, the lineIncrement and the
pageIncrement go wonkie. The scrollBar sez it's set to 5 and 76,
repectively!
Selecting 7 or more pix will "normalize" the scrollBar.
Any ideas?
on setTheScrollBar
global gLineInc,gPageInc -- gLineInc is set elsewhere at 152
put the number of lines in fld "ed.theDB" into theNum
put 6 into numOfPix ## in the display
put ((theNum) + (theNum mod 2) - numOfPix) * gLineInc into theEnd
if theEnd < gLineInc then put gLineInc into theEnd ### less than 6
pix to show
set the startValue of part "thePixScroll" to gLineInc
set the endValue of part "thePixScroll" to theEnd
put 2 * gLineInc into theLineInc ### to scroll properly 'cause it's 2
pix wide!!!!
## put gPageInc , theLineInc
## should be "912,304" but becomes 76,5 if number of pix < 7 !!
set the lineIncrement of part "thePixScroll" to theLineInc
set the pageIncrement of part "thePixScroll" to gPageInc
set the thumbPos of part "thePixScroll" to gLineInc
## set the thumb size
put (gPageInc/numOfPix) + (theLineInc/4) - gLineInc into theThumSiz
set the thumbSize of part "thePixScroll" to theThumSiz
## show how many marked record
put "1 of " & theNum & " records" into fld "theCount"
put the hilite of btn "showMarked" into markedBool
if markedBool then
put number of lines in fld "ed.theDB" into mNum
else
put number of lines in fld "ed.theMarkedDB" into mNum
end if
put mNum &" of " & theNum & " marked" into fld "theMarked"
repeat with x = 1 to 6 ## disabled elsewhere
put "ed.mark.0" & x into bNam
enable btn bNam
end repeat
scrollThisList gLineInc ### reset to top of scroll
end setTheScrollBar
Ray G. Miller
__________________
Turtlelips Productions
4009 Everett Ave.
Oakland, CA 94602
MailTo:rgmiller at pacbell.net
(V) 510.530.1971
(F) 510.482.3491
More information about the metacard
mailing list