473,395 Members | 1,679 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

embedding filedialog in a frame in tkinter

i am trying out tkinter to make a gui..i want to have a frame with an
embedded file explorer next to a 'open directory' label..i tried out
FileDialog and tkFileDialog methods but they open as pop up dialogs..
how do i make this packed into the frame the way button and other
widgets can be packed? i am a newbie to tkinter..

any help greatly appreciated
TIA
dn

Dec 15 '07 #1
2 2725
On 15 dic, 04:30, "dev...@gmail.com" <dev...@gmail.comwrote:
i am trying out tkinter to make a gui..i want to have a frame with an
embedded file explorer next to a 'open directory' label..i tried out
FileDialog and tkFileDialog methods but they open as pop up dialogs..
how do i make this packed into the frame the way button and other
widgets can be packed? i am a newbie to tkinter..
Try using Tix, a Tkinter extension included in the Python library. It
provides a DirList widget:

<code>
import Tix

class App:

def __init__(self, master):

frame = Tix.Frame(master)
frame.pack()

dirlist = Tix.DirList(frame, value=r"f:\download\temp",
command=self.showdir)
dirlist.pack(fill="x")

button = Tix.Button(frame, text="Close",
command=frame.quit)
button.pack()

def showdir(self, directory):
print "user selected", directory

root = Tix.Tk()
app = App(root)
root.mainloop()
</code>

--
Gabriel Genellina
Dec 16 '07 #2
Try using Tix, a Tkinter extension included in the Python library. It
provides a DirList widget:

thanx Gabriel..
Dec 18 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Toph | last post by:
Bonjour a tous, Hi, I am developing a software in Python using Tkinter. The choice of my team is not to use pyton MegaWidgets. I would like to scroll a frame. This is a peace of my code : #...
8
by: Maurice LING | last post by:
Hi, anyone had any experiences in embedding python in python? I've tried to do this but it doesn't work. eval("from Tkinter import *") Thanks maurice
0
by: Sebastien Aubry | last post by:
Hello, I am trying to embed a Tkinter widget (TkZinc, http://www.tkzinc.org) inside a PyGtk HMI. A guru gave me this advice: "I think you can do some magic using the XID of the Tkinter...
1
by: Shankar Iyer (siyer | last post by:
Hi, I am still new to Python and Tkinter, so I apologize in advance if I do not word my question optimally. I am trying to use a frame widget as the parent for other widgets. There is a class...
2
by: William Gill | last post by:
I need to display a couple of labels and a checkbox from each entry in my database. Simple enough, but there are several hundred records, and I only want to display 5 or 10 at a time. Can this be...
2
by: Lyn | last post by:
I am trying to embed a picture into a Bound Object Frame (Me!Photograph) with the following code which is based on MS article http://support.microsoft.com/?id=158941: strPathname =...
2
by: anx | last post by:
I've got a grid-managed frame, containing a column of Labels, and a corresponding column of Entry widgets. I'd like to be able to display dozens, or even hundreds of rows, and use a vertical...
0
by: Ivan Johansen | last post by:
I have written a Windows GUI application in C++ and I would like to embed Python into the application to enable users to write plugins. The problem is when the plugin tries to use Tkinter....
3
blazedaces
by: blazedaces | last post by:
I've taken a look at the class and you only seem to be able to set the file name, but not it's save type. Why is this? Here's some code if you want it, but it doesn't seem to have a method for...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.