On 5 Oct 2008, at 13:45, j. davis wrote: > Greetings... > I'm working on an app using fltk and I need a (vertical) bar graph > that is slightly more versatile than the ProgressBar widget: I want > the actual value, rather than the percent, displayed, and I would > like to have it change color based on the value. Ideally, I would > also like to have labeled tick marks along the side, and thought > that I could perhaps use a slider for the job, instead. Any > thoughts? Thanks!
If the widget is to be "output only", then you may be best just rolling your own. What I did (and it was a while ago) was just derive my own widget from Fl_Box, then in the draw method I drew a filled rectangle of appropriate size to be the progress bar (I guess you could easily alter the colour at this point) then used fl_draw to write the current value over the bar in a contrasting colour... Worked OK, and I think it was less hassle than deriving from Fl_Slider - but I didn't try that at the time so... -- Ian _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

