Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Problem with negative offset of layout

From: bzr:francenet at: 23-Dec-2001 18:28

Hi, It seems that REBOL has problem scrolling layout by a negative offset. Here is an example which does not work, at least on my machine under Linux. When the horizontal or vertical offset is less than -20, the layout is uncorrectly shifted off by one pixel. Could you tell me whether you have the same problem? Or whether there is something wrong in my code? Thanks in advance. ---------------------------------------------------------------------------- REBOL [ ] grid-layout: layout [ origin 0x0 space 0x0 box 201x201 white effect [ grid 20x20 ] ] grid-layout/offset: 0x0 main-layout: layout [ grid-container: box 201x201 with [pane: grid-layout] grid-offset: label 200x24 "" across pad 60 button "up" [ grid-layout/offset/y: grid-layout/offset/y - 20 grid-offset/text: grid-layout/offset show grid-offset show grid-container ] return button "left" [ grid-layout/offset/x: grid-layout/offset/x - 20 grid-offset/text: grid-layout/offset show grid-offset show grid-container ] button "right" [ grid-layout/offset/x: grid-layout/offset/x + 20 grid-offset/text: grid-layout/offset show grid-offset show grid-container ] return pad 60 button "down" [ grid-layout/offset/y: grid-layout/offset/y + 20 grid-offset/text: grid-layout/offset show grid-offset show grid-container ] ] view main-layout