滚动TextView和表格 - Haskell Gtk

时间:2016-01-31 20:55:24

标签: haskell gtk gtk2hs

我正在使用haskell开发gtk proyect。我在horizo​​ntalBox中有一个表和一个textview,我需要在textview的同时滚动这个表。我尝试了一些组合,但我做不到。

这是mi代码,其中scrollingWindow仅适用于textView。

vb <- vBoxNew False 0
containerAdd window vb

boxPackStart vb toolbar PackNatural 2
hseparator <- hSeparatorNew
boxPackStart vb hseparator PackNatural 2

horizontalBox <- hBoxNew False 5
sw <- scrolledWindowNew Nothing Nothing
containerAdd vb horizontalBox


table<- tableNew totalRows 1 True
tableGetColSpacing table 0
widgetSetSizeRequest table 50 675
containerAdd horizontalBox table

textview <- textViewNew 
textViewSetWrapMode textview WrapChar
widgetSetSizeRequest textview 700 400

containerAdd sw textview
containerAdd horizontalBox sw

0 个答案:

没有答案
相关问题