Tix Note Book

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • anil.pundoor@gmail.com

    #1

    Tix Note Book

    hi

    am using Tix notebook and i have two frames in that. am adding some
    widgets in to both of the frames. now i want to delete all of the
    widgets in one of the frame. i dont want to delete the frame, but its
    childres.
    so how can i get the sub widgets within that frame.

    Thanks in advance
    Anil

  • Martin Franklin

    #2
    Re: Tix Note Book

    anil.pundoor@gm ail.com wrote:[color=blue]
    > hi
    >
    > am using Tix notebook and i have two frames in that. am adding some
    > widgets in to both of the frames. now i want to delete all of the
    > widgets in one of the frame. i dont want to delete the frame, but its
    > childres.
    > so how can i get the sub widgets within that frame.
    >
    > Thanks in advance
    > Anil
    >[/color]


    Anil,


    Standard Tkinter widgets have a .children so for your frame widget
    try printing the value of yourframe.child ren like so:-

    Python 2.2.3 (#42, May 30 2003, 18:12:08) [MSC 32 bit (Intel)] on win32
    Type "copyright" , "credits" or "license" for more information.
    IDLE 0.8 -- press F1 for help[color=blue][color=green][color=darkred]
    >>> import Tkinter
    >>> root=Tkinter.Tk ()
    >>> l=Tkinter.Label (root)
    >>> l.pack()
    >>> print root.children[/color][/color][/color]
    {'10703960': <Tkinter.Labe l instance at 0x00A35458>}[color=blue][color=green][color=darkred]
    >>>[/color][/color][/color]

    HTH
    Martin

    Comment

    Working...