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

[REBOL] Slim sliders

From: oliva:david:seznam:cz at: 17-Nov-2001 16:14

Slim sliders ============ Hi there, some of you send me, that the slim sliders, that I used in my 'color-lab script are so slim, that it's difficult to drag them. That was true, because I was using the standart Rebol slider feel. I think that this is the simplest way how to fix it: rebol [ title: "another slider" author: "Oldes" ] view layout [ style test-slider slider with [ feel: make feel [ engage: func [face action event][ if find [over away down] action [ face/data: event/offset svvf/drag-off face face/pane event/offset - (face/pane/size / 2) show face ] ] ] ] text 300 "Default Rebol slider:" slider 300x15 text 300 "and improved slider:" test-slider 300x15 text 300 "So now you will not have problems with ultra slim draggers like this one:" test-slider 300x15 edge [size: 1x1 color: black] with [ init: [ pane: make dragger [ color: white edge: make edge [size: 1x1 color: black] ] either size/y >= size/x [ pane/size/y: 4 pane/edge/size/x: 0 ][ pane/size/x: 4 pane/edge/size/y: 0] ] ] ] ;----------------------------- BTW: thank's for your RGB<->HSB advices. Oldes