Hi i was wondering, is it possible to display text in a widget? i need to print a grid with a whole lot of numbers on a display and i was wondering if i can print such a thing in a canvas?
Text in a canvas
Collapse
X
-
Tags: None
-
Yes. From Tkinter Reference, New Mexico Tech Computer Center:
"You can place any Tkinter widget onto a canvas by using a canvas window object. A window is a rectangular area that can hold one Tkinter widget. The widget must be the child of the same top-level window as the canvas, or the child of some widget located in the same top-level window."
To place multiple widgets in one canvas window object, add a Frame to the canvas window and add the widgets to the Frame.
Adding the canvas window:Code:id = C.create_window ( x, y, option, ... )
-
-
Ive put in that code im just not sure how to add a widget to the window, it has to be text.
frm.window = frm.board.creat e_window ( 0, 500)
any query, is it also possible to track the location of the widget in x,y coordinates? By this i mean with the mouse hovering it could give me perhaps the location of itComment
Comment