From: David B. <d....@co...> - 2004-04-26 18:13:29
|
Because I didn't know about it! I was looking in Controls for a status bar wrapper, not Menus. None of the samples had status bars and I wanted to start off by doing something that wasn't in the samples. I guess I need to browse *all* of the documentation so I have a better idea of what's where. Thanks for your help! -- David ----- Original Message ----- From: "Daan Leijen" <daa...@xs...> To: "David Bakin" <d....@co...>; <wxh...@li...> Sent: Monday, April 26, 2004 4:39 AM Subject: Re: [wxhaskell-users] How do I call statusBarSetStatusWidths :: StatusBar a -> Int -> Ptr CInt -> IO () > On Mon, 26 Apr 2004 01:18:11 -0700, David Bakin <d....@co...> wrote: > > > Hi. I'd like to call statusBarSetStatusWidths - apparently it wants an array of integers (the status field widths) - how do I create that as a Ptr CInt? > > Hi Dave, > > This should be in wxhaskell of course, I'll add it to the next version. > For now, you can use the same code as in "WXCore.Frame.statusBarCreateFields". > If you don't have access to the sources, here it is: > > import Foreign.Marshal.Array > ... > statusBarCreateFields :: Frame a -> [Int] -> IO (StatusBar ()) > statusBarCreateFields parent widths > = do ... > then do withArray (map toCInt widths) > (\pwidths -> statusBarSetStatusWidths sb (length widths) pwidths) > ... > > All the best, > Daan. > > btw. I am curious why you need to call this function? Are the functions > in "WX.Menu" not good enough (and why not)? Maybe we can improve the interface? > > |