Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

comboBoxNewText does not display strings #10

Closed
instantepiphany opened this issue Feb 6, 2014 · 0 comments
Closed

comboBoxNewText does not display strings #10

instantepiphany opened this issue Feb 6, 2014 · 0 comments

Comments

@instantepiphany
Copy link

Combo boxes do not display strings using the gtk3 package, but the same code works when linked to the gtk2 package. This code is from the question I posted on stackoverflow: http://stackoverflow.com/questions/21591618/combobox-doesnt-show-any-of-its-strings/21594858

import Graphics.UI.Gtk
import Control.Monad.IO.Class

main = do
  initGUI
  window <- windowNew
  set window [windowTitle := "Table", containerBorderWidth := 20,
              windowDefaultWidth := 800, windowDefaultHeight := 600]

  table <- tableNew 10 10 True
  containerAdd window table 
  lbox <- hBoxNew False 0
  rbox <- hBoxNew False 0
  tableAttachDefaults table lbox 0 3 0 10
  tableAttachDefaults table rbox 3 10 0 10

  cb <- comboBoxNewText
  comboBoxAppendText cb "test"
  boxPackStart lbox cb PackGrow 10

  on window deleteEvent $ liftIO mainQuit >> return False
  widgetShowAll window
  mainGUI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant