imacarthur wrote:
> 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  
> 
> 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..

        Yes, that's what I did for this cpu/ram horizontal bar graph app:
        http://www.seriss.com/rush-current/rushtop/

        Basically all fl_rectf()'s with fl_rect() borders, and fl_draw()
        to draw the right-aligned text.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to