473,387 Members | 1,590 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,387 software developers and data experts.

How to enable Load option in tkinter -python

Hi

I need to design a tkinter widget where i should have a browse option button as you see in all windows application to select a file from my machine.
Also i need to select an integer from some dropdown box.
How can i implement this... I m donewith the backend python coding.. but i need help for the front end..

I tried using the code which i got from google..

its like

from ViewerFramework.gui import InputFormDescr
from ViewerFramework.customizedWidgets import SaveButton
idf = InputFormDescr(title = 'SaveButton')

#button description
buttonwcfg = {'text':'Save', 'bg':'Red',
'fg':'Black','borderwidth':5}

idf.append({'widgetType':SaveButton,
'name':'save',
'wcfg':{'buttonType':Tkinter.Button,
'title':'Save In File ...',
'types':[('All Files','*.*'),
('Python Files','*.py')],
'widgetwcfg':buttonwcfg},
'gridcfg':{} })
val = self.vf.getUserInput(idf)

But i am am getting error like

"ImportError: No module named ViewerFramework.gui"


i m not sure how this progrm works...
please help me in coding these...


Thanks,
Anil Roy
Jun 26 '08 #1
2 2761
jlm699
314 100+
Those classes you are trying to import of part of a package distributed by this MGL Tools website. Click the download link on the left of the page to get the MGLtools package, which includes what you need.

Also make sure you have Tkinter.
Jun 26 '08 #2
dazzler
75
Hi

I need to design a tkinter widget where i should have a browse option button as you see in all windows application to select a file from my machine.
Just use Tkinter's filedialog =)
google tkFileDialog for more dialog types

Expand|Select|Wrap|Line Numbers
  1. import tkFileDialog
  2.  
  3. path_name = tkFileDialog.asksaveasfilename(title="Save File", filetypes=[("Python Files",".py"),("All Files",".*")])
  4.  
  5. print "in the code, save your file to", path_name
Jun 27 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: Harlin Seritt | last post by:
There are certain options for Tkinter widgets that have default values that I don't much care for (borderwidth, font come to mind) and continuously change when I'm building interfaces. With a bit...
1
by: Deepak | last post by:
hello Frendz, 1.I want to display a tool tip for each item in multi select box(list box) in a web page. 2.i want to enable the horizondal scroll for the list box. if any genius knows the...
1
by: hortoristic | last post by:
We are using JavaScript to Enable/Disable certain fields on web pages based on business rules. A simple example is if when using an option type tag, and the two options are Yes and No. If YES...
0
by: syed_saqib_ali | last post by:
Below is a simple code snippet showing a Tkinter Window bearing a canvas and 2 connected scrollbars (Vertical & Horizontal). Works fine. When you shrink/resize the window the scrollbars adjust...
3
by: db2udbgirl | last post by:
Env: DB2 UDB 8.2, AIX 5.3 While trying to load data (73 Million rows, Medium size table uses 4K tablespace) into a table using cursor it fails with "SQL0964C The transaction log for the database...
2
by: Kevin | last post by:
I've been looking all over and I can't seem to find what ought to be simple. I need to disable a drop down when a checkbox is checked, and enable it when same checkbox is unchecked. I've...
2
by: msmb04 | last post by:
hi all, i am trying to use message queue in PHP, before we going to use shoult enable the SYSVMSG option. im not clear that how to enable sysvmsg option. possible can send the steps to enable...
10
by: viki1967 | last post by:
Disable/enable icon.gif Hi all. I have this form in the page.htm: <form action="form.asp" method="post" onsubmit="return(validateForm(this));"> <select size="1" name="t_im"...
3
by: jessy | last post by:
I dont know if im postin in the right forum coz im not sure whether this is JS or PHP problem .. my problem is i have a text field which is disabled and i need to enable it when the user selects...
4
by: cptuser | last post by:
Hi, I have an online form which has a select element, which I;m using very basic JS to enable and disable a select element based on the selection of another select element. For some reason, the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.