From: Daniel F. <dan...@on...> - 2004-11-08 08:09:00
|
Hello Daan, I haven't heard from you. So have you made any progress or could you reproduce the problem? Thanks again for you help. Daniel > Daniel Fischer wrote: > >>Hello! >> >>I have a strange problem when using splitter windows with a spin >>control inside. I reduced my problem to the sample code below. When I >>running it on Windows I"m unable to resize the top left area by moving >>the vertical splitter bar left or right. But the horizontal splitter >>bar works fine. It seems to be a problem with the spin control. When >>replacing the spin control by a simple text entry (changing the line >>"spin <- spinCtrl panelLeft 0 100 []" to "spin <- textEntry panelLeft []") >>both splitter bars work fine. Strangly this problem does not occur >>when running it on Linux. >> >>Is it my fault or is there a bug in wxHaskell or in wxWidgets? >>I"m using Windows XP prof SP2, ghc 6.2.1 and wxHaskell 0.8. >> >> > It seems a wxWidgets problem. I will try this out on monday on my > windowsXP system. > (it also seems that spin controls don"t propagate their events > correctly, so it might be > related to that bug) > > -- Daan. > >>And just another related question: how can I make the splitter windows >>respect the minimum size needed for the controls in the splitter >>panes? >> >>Many thanks in advance for your help >>Daniel Fischer >> >>---8<---------- sample code ----------8<--- >> >>module Main where >> >>import Graphics.UI.WX >>import Graphics.UI.WXCore >> >>main :: IO () >>main >> = start gui >> >>gui :: IO () >>gui >> = do f <- frame [ text := "error?" ] >> >> hSplit <- splitterWindow f [ style := wxSP_3DSASH ] >> vSplit <- splitterWindow hSplit [ style := wxSP_3DSASH ] >> panelLeft <- panel vSplit [] >> >> spin <- spinCtrl panelLeft 0 100 [] >> entry <- textEntry panelLeft [] >> btn1 <- button panelLeft [ text := "Ok" ] >> btn2 <- button panelLeft [ text := "Ok" ] >> list1 <- listCtrl panelLeft [ columns := [("foo",AlignLeft,100)] ] >> list2 <- listCtrl vSplit [ columns := [("bar",AlignLeft,100)] ] >> list3 <- listCtrl hSplit [ columns := [("baz",AlignLeft,100)] ] >> >> subLayoutLeft <- return $ vfill $ column 5 >> [ boxed "box 1" $ row 5 [ fill $ widget spin, widget btn1 ] >> , boxed "box 2" $ row 5 [ fill $ widget entry, widget btn2 ] >> ] >> >> layoutLeft <- return $ fill $ row 5 [ fill $ widget list1, subLayoutLeft ] >> set panelLeft [ layout := layoutLeft ] >> >> layoutTop <- return $ vsplit vSplit 5 300 (widget panelLeft) (widget list2) >> layoutAll <- return $ hsplit hSplit 5 300 layoutTop (widget list3) >> >> set f [ layout := minsize (sz 640 400) $ fill layoutAll ] >> >> >> >> >>------------------------------------------------------- >>This SF.net email is sponsored by: IT Product Guide on ITManagersJournal >>Use IT products in your business? Tell us what you think of them. Give us >>Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more >>http://productguide.itmanagersjournal.com/guidepromo.tmpl >>_______________________________________________ >>wxhaskell-users mailing list >>wxhaskell-users@li... >>https://lists.sourceforge.net/lists/listinfo/wxhaskell-users >> >> >> >> |