CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2007
    Posts
    9

    Question Python + TKinter + tixDirList

    Hi!

    I have tried to get very simple thing working, but without success. Used couple of hours to understand, how the tix widgets work, but no luck at all.

    Problem description:
    dir_list = DirList(master)
    dir_list.chdir('c:\\')

    Problem is, that chdir just selects the item. I want it to reload the content too. Other words, instead of 'browse', I want 'activate' to happen.

  2. #2
    Join Date
    Jan 2007
    Posts
    9

    Re: Python + TKinter + tixDirList

    Hi again!

    This message seems to be missing answers. Is it because of lack some information?

    Here is a full program, where the problem can be inspected:
    Code:
    #!/usr/bin/env python
    from Tkinter import *
    from Tix import *
    import os
    
    os.chdir(r"c:\temp")
    
    root = Tk()
    root.columnconfigure(0, weight=1)
    root.rowconfigure(0, weight=1)
    
    mainframe = Frame(root)
    mainframe.grid(column=0, row=0, sticky=(N, W, E, S))
    mainframe.columnconfigure(0, weight=1)
    mainframe.rowconfigure(0, weight=1)
    
    dir_list = DirList(mainframe)
    dir_list.grid(column=0, row=0, sticky=(N, W, E, S))
    dir_list.chdir('c:\\')
    
    root.mainloop()
    In this example, directory contents are shown for c:\temp, which has been the working directory. I'd like to force the update to show the contents of c:

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured