473,770 Members | 6,322 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Tkinter wrappers for TkTreeCtrl and Tile

I was looking at the Tcl/Tk sourceforge page and found that there were
a couple of new widgets being produced for Tcl 8.5. Does anyone know if
there are any Tkinter wrappers somewhere?

thanks,

Harlin

Jul 18 '05 #1
7 4539
Harlin Seritt wrote:
I was looking at the Tcl/Tk sourceforge page and found that there were
a couple of new widgets being produced for Tcl 8.5. Does anyone know if
there are any Tkinter wrappers somewhere?

thanks,

Harlin


Harlin,
I can't see the web page saying these will be included in Tk 8.5 can you
give me the URL?

As far as wrappers go, if they don't exist (and I don't think they do)
it is fairly easy to create them provided they are written in a very
similar style to 'standard' Tk widgets. Somone usually steps up and
patches Tkinter.py to include changes in the Tk core, but usually only
when a new _final_ version is released...

Martin.

Jul 18 '05 #2
Martin,

Take a look here:
http://mail.python.org/pipermail/tki...ch/000010.html
It is a well-known post from what I understand. You may have already
seen it before. Actually, (as I'm looking at a 8.4 demo set from
ActiveTcl distribution), it seems the Tree widget has been added to the
8.4 set. I don't think the Tiles has been added just yet though.

Harlin

Jul 18 '05 #3
Harlin Seritt wrote:
Martin,

Take a look here:
http://mail.python.org/pipermail/tki...ch/000010.html
It is a well-known post from what I understand. You may have already
seen it before. Actually, (as I'm looking at a 8.4 demo set from
ActiveTcl distribution), it seems the Tree widget has been added to the
8.4 set. I don't think the Tiles has been added just yet though.

Harlin

Thanks, I must have missed it first time round...
after more googling I did find a reference to Tile going
into Tk 8.5 but it was not on the tcltk wiki recent changes
for 8.5:

http://wiki.tcl.tk/10630

Which made me think it will not go in.....

Cheers,
Martin.

Jul 18 '05 #4
Martin,

If I may ask, who actually works on the Tkinter module? Is there a
certain group that does this? I'm just curious as I've never been able
to find this information. I know there are, of course, someone who
develops Tk but just not sure who does this on the Python side.

Thanks,

Harlin

Jul 18 '05 #5
Harlin Seritt wrote:
Martin,

If I may ask, who actually works on the Tkinter module? Is there a
certain group that does this? I'm just curious as I've never been able
to find this information. I know there are, of course, someone who
develops Tk but just not sure who does this on the Python side.

Thanks,

Harlin


Harlin,

There is no Tkinter group of core developers, if somthing needs doing
then it is done by those who need it (AFAIK) I have made a few small
patches to Tkinter.py in the past and will do so again should I need to
I have been looking some more at Tile - it's come a long way in the
last few months (since the last time I looked at it), I have even
started writting a *test* wrapper for it (I first had to build tcl, tk,
tile and python from source!)

I have created a Style class (as a mixin like the Pack and Grid classes
in Tkinter.py

I have also wrapped the Tile.Button but right now it extends
Tkinter.Widget class (as it is starting to look like a large chunk of
work wrapping Tile from scratch;-)

That said I have got a Tile Button example working (and I can change
it's style) so perhaps not that much work

I've cc'd the tkinter mailing list to see if there is any more interest
over there...

Cheers
Martin

Jul 18 '05 #6
(snip)
That said I have got a Tile Button example working (and I can change
it's style) so perhaps not that much work
Do you happen to have a sampling of this that I can get my hands on??
I've cc'd the tkinter mailing list to see if there is any more interestover there...


Thanks for doing so!

Harlin

Jul 18 '05 #7
Harlin Seritt wrote:
(snip)
That said I have got a Tile Button example working (and I can change
it's style) so perhaps not that much work

Do you happen to have a sampling of this that I can get my hands on??

I've cc'd the tkinter mailing list to see if there is any more
interest
over there...

Thanks for doing so!

Harlin

Harlin,

Sure here is all 90 lines of it:-
############### ############### ########
import Tkinter
from Tkconstants import *
class Style:
def default(self, style, **kw):
"""Sets the default value of the specified option(s) in style"""
pass

def map_style(self, **kw):
"""Sets dynamic values of the specified option(s) in style. See
"STATE MAPS", below."""
pass

def layout(self, style, layoutSpec):
"""Define the widget layout for style style. See "LAYOUTS" below
for the format of layoutSpec. If layoutSpec is omitted, return the
layout specification for style style. """
pass

def element_create( self, name, type, *args):
"""Creates a new element in the current theme of type type. The
only built-in element type is image (see image(n)), although
themes may define other element types (see
Ttk_RegisterEle mentFactory).
"""
pass

def element_names(s elf):
"""Returns a list of all elements defined in the current theme.
"""
pass

def theme_create(se lf, name, parent=None, basedon=None):
"""Creates a new theme. It is an error if themeName already
exists.
If -parent is specified, the new theme will inherit styles,
elements,
and layouts from the parent theme basedon. If -settings is
present,
script is evaluated in the context of the new theme as per
style theme
settings.
"""
pass

def theme_settings( self, name, script):
"""Temporar ily sets the current theme to themeName, evaluate
script,
then restore the previous theme. Typically script simply
defines styles
and elements, though arbitrary Tcl code may appear.
"""
pass

def theme_names(sel f):
"""Returns a list of the available themes. """
return self.tk.call("s tyle", "theme", "names")

def theme_use(self, theme):
"""Sets the current theme to themeName, and refreshes all
widgets."""
return self.tk.call("s tyle", "theme", "use", theme)

class Button(Tkinter. Widget, Style):
def __init__(self, master=None, cnf={}, **kw):
master.tk.call( "package", "require", "tile")
Tkinter.Widget. __init__(self, master, 'ttk::button', cnf, kw)

class Treeview(Tkinte r.Widget):
def __init__(self, master=None, cnf={}, **kw):
master.tk.call( "package", "require", "tile")
Tkinter.Widget. __init__(self, master, 'ttk::treeview' , cnf, kw)

def callback():
print "Hello"

root = Tkinter.Tk()

b = Button(root, text="Tile Button", command=callbac k)
b.pack()

print b.theme_names()

b.theme_use("st ep")

b1 = Tkinter.Button( root, text="Tk Button", command=callbac k)
b1.pack()

tree = Treeview(root)
tree.pack()

root.mainloop()
############### ###############

Jul 18 '05 #8

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

Similar topics

0
4890
by: Mark 'Kamikaze' Hughes | last post by:
In the new Python game I'm developing, I need to crop out individual tiles from larger tilesets, and maintain transparency. Unfortunately, I've run into major deficiencies in both Tkinter and PIL (PyGame, wxPython, PyQt, etc. are not really suitable for this program, for a number of reasons, and I have zero interest in discussing why right now). Since the Tkinter.PhotoImage.copy() method doesn't allow a region parameter, I have to save...
0
1071
by: Kevin Walzer | last post by:
What is the recommended/preferred widget in Tkinter in the following areas: 1. Multi-column list display. I'm aware of bindings for Tktable, tablelist, and mclistbox, as well as Python-megawidgets that handle this. 2. Tree widgets. I'm aware of Gene Cash's tree widget, the IDLE tree widget, as well as wrappers for BWidgets and tktreectrl. Rather than wade through every one of these different widgets, I'd like to get a sense of which...
32
7493
by: Kevin Walzer | last post by:
I'm a Tcl/Tk developer who has been working, slowly, at learning Python, in part because Python has better support for certain kinds of applications that I want to develop than Tcl/Tk does. Naturally, I thought that I would use Tkinter as the GUI for these programs. However, in doing research into GUI development techniques, sample code, and showcase applications, what has struck me is how little sophisticated GUI development seems to be...
0
1264
by: Kevin Walzer | last post by:
Is anyone using Tile in their Tkinter applications? Tile provides native theming for Windows XP and Mac OS X, and provides an improved Tk look-and-feel on Unix/Linux. For info on Tile: http://tktable.sourceforge.net/tile It's in the process of going into the Tk core, so it will be available with Tk 8.5 with no additional libraries required.
1
2972
by: Kevin Walzer | last post by:
I'm not sure how often members of this list visit the Tkinter wiki at http://tkinter.unpythonic.net/wiki/FrontPage; this wiki seems to have less traffic in general than the Tcl/Tk wiki at http://wiki.tcl.tk. Given that, I hope it's not out of line for me to call attention to several pages that I've posted about integrating Tile (http://tktable.sourceforge.net/tile) and TableList (http://www.nemethi.de, http://wiki.tcl.tk/5527) into...
2
5383
by: Ben Finney | last post by:
Howdy all, Python programmers looking for a built-in GUI toolkit are told two things: one, Python already comes with a GUI toolkit, and two, it looks equally ugly on all platforms. This is because the Tk widget library, that Tkinter uses, defaults to looking like Motif, which hasn't been the default widget set of *anything* for a long time. The Tk folks are apparently getting their act together. Tile is a "theming engine" for Tk with...
44
5003
by: bg_ie | last post by:
Hi, I'm in the process of writing some code and noticed a strange problem while doing so. I'm working with PythonWin 210 built for Python 2.5. I noticed the problem for the last py file processed by this script, where the concerned tmp file is only actually written to when PythonWin is closed. In other words, after I run this script, one of the generated tmp files has a size of 0kB. I then close PythonWin and it is then written to.
11
3571
by: Kenneth McDonald | last post by:
Any guesses as to how many people are still using Tkinter? And can anyone direct me to good, current docs for Tkinter? Thanks, Ken
4
3984
by: Mudcat | last post by:
So I haven't programmed much in Python the past couple of years and have been catching up the last few days by reading the boards. I'll be making commercial Python applications again and wanted to see what's new in the Gui department. I started using Tkinter several years ago and have a lot of stuff written in it. As a result, it's hard to switch to another interface (wxPython, PyQt, etc) with all the hours it would take to reproduce...
0
9425
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10053
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10001
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8880
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5312
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5449
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3969
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3573
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2816
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.