[Haskell-cafe] haskell-gtk entry question
briand at aracnet.com
briand at aracnet.com
Sun Jul 28 05:50:08 CEST 2013
On Sat, 27 Jul 2013 15:44:44 +0100
Claude Heiland-Allen <claude at mathr.co.uk> wrote:
> Perhaps it's a terminology confusion: in GTK, "activate" for an entry
> means "pressing return key". This program works fine for me, pressing
> return prints the text I entered in the box:
>
> ----8<----
> import Graphics.UI.Gtk
>
> main :: IO ()
> main = do
> initGUI
> window <- windowNew
> entry <- entryNew
> set window [ containerBorderWidth := 10, containerChild := entry ]
> entry `on` entryActivate $ putStrLn =<< entryGetText entry
> onDestroy window mainQuit
> widgetShowAll window
> mainGUI
> ----8<----
yes that's part of the problem - I thought that tabbing through the fields should be an "activate" event. still I had some other problem, and I'm not sure what it was. however thanks to your example I now have the dialog working as it should.
thanks very much !
Brian
More information about the Haskell-Cafe
mailing list