Text in a canvas

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • v2rocketboy
    replied
    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 it

    Leave a comment:


  • v2rocketboy
    replied
    sorry i pressed post by mistake reply is below

    Leave a comment:


  • bvdet
    replied
    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, ... )

    Leave a comment:


  • v2rocketboy
    started a topic Text in a canvas

    Text in a canvas

    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?
Working...