Go to the first, previous, next, last section, table of contents.

Sliders in action

Creating a slider is simple, you only need to specify the orientation you want:


module Main(main) where

import Haggis

main =
 mkDC [] >>= \dc ->
  slider XAxis  dc >>= \(sli,dh1) ->
  label  "0.00" dc >>= \(lab,dh2) ->
 realiseDH dc (hbox [dh2,dh1]) >>
 loopIO (
   waitSliderMovement sli >>= \ (v,_) ->
   let
    str = printf "%1.2f" [UDouble v]
   in
   setLabel lab str) >>
 return ()

Slider w/feedback

The Slider handle returned by slider will report the fraction the sliding thumb is along the total sliding area.


Go to the first, previous, next, last section, table of contents.