From: Conal E. <co...@co...> - 2005-05-18 22:09:09
|
Thanks, Daan. After digging into the CustomControl example, I found "refresh", which does allow me to see the panel bgcolor change. I had been using "repaint". What's the difference, and is refresh always the better choice? - Conal -----Original Message----- From: Daan Leijen [mailto:da...@cs...] Sent: Wednesday, May 18, 2005 1:15 PM To: Conal Elliott Cc: wxhaskell-users Subject: Re: [wxhaskell-users] color/bgcolor or border attribute for panels Hi Conal, Conal Elliott wrote: > I'm trying to selectively highlight panels and controls. I've tried > setting the "color" and the "bgcolor" attributes, with no visible effect .. This should definitely work with panels. Maybe try to set them 'later': > do p <- panel [..] > set p [bgcolor := blue] or 'earlier': > do p <- panel [bgcolor := red] Also look at the "samples/wx/customcontrol.hs" sample. > on panels. I'm using a row & column layouts with enough spacing to > mouse into the space between controls, and I do get enter events there. The "enter" and "leave" events seem to be broken on windows. They kind of work, but they are only fired after a while. The documentation of wxWidgets seems to imply that the windows API itself doesn't allow for precise enter/leave events. > I've also tried using the border attribute on panels and controls, also > without visible result. I'm running Windows XP. Hmm, border should work too. Maybe it is an attribute that you can only set on construction, ie. use: > do p <- panel f [border := BorderStatic] I hope this helps, -- Daan > > > > Should color, bgcolor, or border work for panels? > > > > Is there another way to dynamically highlight a control or panel? > > > > Thanks! > > > > - Conal > |