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.

> how can I understand which scroll bars( horizontal or vertical) was selected
> and how should I write my scroll call back?
> (I insist on using Fl_Scroll not Fl_Scrollbar)

        You're taking a hard road.

        Fl_Scroll is used to scroll the entire contents of the area it encloses.

        What you could perhaps do is position your row/col headers outside the
        scroll area inside a clipped group. It'd be up to you to keep the
        headers aligned with the Fl_Scroll's contents by adding your own
        callback to Fl_Scroll's vert and horiz scrollbars, to handle tracking
        your row and col headers with the scroll's contents.

> another question is how should I open a saved spreed sheet? I saved it
> and restore it using files but the new spreed sheet I open is not editable

        Sounds like a problem in your code; we'd need more info in the form
        of a compilable simplified version of your code to see what the issue 
is.

> I don't know why I can one time I run the program draw a chart and next time
> I try to I encounter with an empty page, should I add something else to
> my program or the problem is something else?

        Again, would need to see your code, as you're probably doing something
        wrong in how you build and/or position the widgets that's causing the
        problem.

        Make a copy of your code, and remove all unrelated functionality
        so that you can build a simple version of your program that shows
        the problem, and post the /compilable/ simplified code here
        so we can help determine the issue by looking at the code and
        running it ourselves.
_______________________________________________
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to