From: Daan L. <da...@cs...> - 2005-05-19 07:49:39
|
Conal Elliott wrote: > 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? Well, it is complicated: refresh w = windowRefresh w True repaint w = windowRefresh w False The second parameter to windowRefresh tells whether the background should be erased (according to the wxWidgets documentation). In general, repaint is better or otherwise you get "flicker" on most platforms. In your case, refresh is obviously the better choice :-) I'll try to document this somewhere. -- Daan. > > - 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 >> > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by Oracle Space Sweepstakes > Want to be the first software developer in space? > Enter now for the Oracle Space Sweepstakes! > http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click > _______________________________________________ > wxhaskell-users mailing list > wxh...@li... > https://lists.sourceforge.net/lists/listinfo/wxhaskell-users |