From: Stephen D. <st...@da...> - 2002-11-05 14:04:29
|
Takaaki or others, I'm having redraw pain - perhaps you can help? I have a Browser_ subclass that I'm using to show a multi-column SQL result set. I have also created a Box subclass that I'm using as a heading line placed on top of the Browser_ subclass. Now Browser_ automatically adds a horizontal scrollbar if the item_widths exceed the size of the browser. The user can now scroll the browser left-right. I want to get the header widget to redraw when the browser is scrolled - my draw routine uses the hposition from the browser to draw the heading correctly aligned. Unfortunately, I can't get the heading to redraw at the right time. FLTK has the horizontal scrollbar callback use hposition to scroll the browser. Unfortunately, that hposition method isn't virtual so I can't intercept it in ruby in order to also scroll the heading. So my second idea was to detect the change in hposition in my Browser_ item_draw. This detection works OK. But: when I notice the hposition change I call the heading's redraw. At which point nothing happens. I suppose this has something to do with the fact that I call the heading's redraw out of the browser_'s draw. But I can't figure out why or what the connection is... Any ideas or suggestions? Thanks, Steve Davies |