The Canvas object is not a proper Tk object since Tk doesn't support
Cairo-based rendering and isn't very friendly to being extended. Switching
to a more flexible framework like Gtk should help here.


On Tue, Sep 1, 2015 at 2:17 PM Dömötör Gulyás <[email protected]> wrote:

> I'm trying to build a scrollable Cario canvas in a Tk GUI, but I keep
> getting "TclError("unknown option -xscrollcommand")" trying to add the
> scrollbars, apparently the canvas is a frame ("winfo class" returns
> "Frame"), which is not scrollable.
>
> Is there a way to add scrollbars to a Cairo canvas, or can something be
> done to make it the proper widget class?. I've tried changing the
> constructor from c = TkWidget(parent, "ttk::frame") to c = TkWidget(parent,
> "ttk::canvas"), but that doesnt seem to help, and I see no other obvious
> place to change.
>
> Anyone have any idea how to go about this? I've also tried to build the
> GUI in Gtk, but that hasn't worked out for other reasons.
>
>

Reply via email to