On 02/01/12 09:22, Greg Ercolano wrote:
> On 02/01/12 08:29, Forough Mehralian wrote:
>> I wanted to add labels rows and columns but something that is important
>> is that the labels of rows should just scroll by the vertical scroll bar
>> and the labels of columns should just scroll by the horizontal scroll bar
>> and I dont know how should I do this?
> 
>       First: this sure sounds like what Fl_Table would be used for.
>       Have a look at the examples/table-spreadsheet example that comes with 
> 1.3.x.
>       which does exactly what you describe.

   BTW, regarding the above examples/table-spreadsheet example in 1.3.x,
   if you run the example then resize the window smaller, scrollbars appear,
   letting you see the exact behavior you describe above.

   Please try the example.

   This example is also scales well because there is only ever /one/
   instance of an Fl_Input widget. So even if there's thousands of
   rows and columns, it still scrolls quickly and takes little memory,
   because it avoids having one Fl_Input for each cell.

   This example of Fl_Table uses a model/view approach, where the 'model'
   (data) is just a C array, and the 'view' (UI) is Fl_Table calling
   your own draw code to handle drawing the data in each cell.
   (This allows you to display the data as text, graphs, or whatever)
_______________________________________________
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to