Thanks much for the pointers, Mads. I read the binview source code, which
uses a global mutable table to store per-instance data. I wonder if there's
a nicer way. did you ever find one? - Conal
On Nov 28, 2007 9:47 AM, Mads Lindstrøm <[EMAIL PROTECTED]> wrote:
> Hi
>
> Conal Elliott wrote:
> > I want to make (or find) a float-valued slider that displays its
> > current value and maybe its bounds. Does anyone have advice about
> > doing that sort of thing. I want the result to have have a
> > control-like interface, including a gettable attribute for the current
> > (float) value. Thanks, - Conal
>
> To have a gettable attribute you need to make the type containing the
> slider an instance of Valued. See
> http://wxhaskell.sourceforge.net/doc/Graphics.UI.WX.Classes.html#t%
> 3AValued and:
>
> import qualified Graphics.UI.WX as Wx
>
> instance Wx.Valued YourTypeContainingTheSlider where
> value = Wx.newAttr "Value" ioActionToGetValue ioActionToSetValue
>
> there is also other classes you can make your type an instance of. See
> the link above. You should properly make it an instance of Widget as a
> minimum.
>
> I also asked about something similar before. I got this reply
>
> http://www.mail-archive.com/wxhaskell-users@lists.sourceforge.net/msg00260.html.
>
>
> Greetings,
>
> Mads Lindstrøm
>
>
>
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
wxhaskell-users mailing list
wxhaskell-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users