Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #83171 > unrolled thread
| Started by | abaskm@gmail.com |
|---|---|
| First post | 2015-01-03 10:30 -0800 |
| Last post | 2015-01-04 15:45 -0500 |
| Articles | 4 — 3 participants |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Python Tk Tix GUI documentation & builder overview and tips abaskm@gmail.com - 2015-01-03 10:30 -0800
Re: Python Tk Tix GUI documentation & builder overview and tips Terry Reedy <tjreedy@udel.edu> - 2015-01-03 16:57 -0500
Re: Python Tk Tix GUI documentation & builder overview and tips Christian Gollwitzer <auriocus@gmx.de> - 2015-01-04 09:23 +0100
Re: Python Tk Tix GUI documentation & builder overview and tips Terry Reedy <tjreedy@udel.edu> - 2015-01-04 15:45 -0500
| From | abaskm@gmail.com |
|---|---|
| Date | 2015-01-03 10:30 -0800 |
| Subject | Re: Python Tk Tix GUI documentation & builder overview and tips |
| Message-ID | <5373bac1-9d1b-4468-adb8-361240afef92@googlegroups.com> |
Hi,
I have had issues running Tix on python 2.7.6 and 3.4.2:
More details on the issue here.
http://stackoverflow.com/questions/27751923/tix-widgets-installation-issue
Has anyone had similar issues with Tix?
Thanks and Happy New Year.
On Friday, March 27, 2009 5:19:42 PM UTC-4, bal...@googlemail.com wrote:
> I have recently started development for a small video conversion
> project using a GUI. After some research I decided to use Tkinter/Tix
> (Tk/Tix). The reasons are mainly:
>
> 1. the GUI is rather simple, and
>
> 2. the end-user is not necessarily technically inclined so I want to
> keep
> a) required libraries as few as possible, and
> b) installation as painless as possible.
>
> 3. Tk/Tix is included with Python. Thus only a Python installation is
> needed. Nothing else.
>
> 4. Tk itsself misses some rudimentary widgets like meters, multi/colum
> lists, grid and scrolled widgets. Tix provides those. Good enough for
> my little application (more advanced and more modern widgets are
> available in frameworks like Qt, Gtk, or wxWindows).
>
>
> Before starting I spent some effort to find
> a) relevant documentation,
> b) GUI Builders which might help me,
> c) answers to non-obvious questions.
>
> The process took some time and effort so I want to share my findings:
>
> a) Documentation resources
>
> Python Docs
> http://docs.python.org/library/tkinter.html
> Tk Commands
> http://www.tcl.tk/man/tcl8.5/TkCmd/contents.htm
> Tix Reference
> http://tix.sourceforge.net/man/html/contents.htm
> Tix demo application
> You want to extract the Tix demo application coming with the Tix
> 8.4.3 source distribution. It contains examples for many widgets -
> unfortunately none for multi-column HList or the Grid (see below).
> https://sourceforge.net/project/showfiles.php?group_id=5649&package_id=5704
> Tix8.4.3-src.tar.gz, then look in /Tix8.4.3/Python/Demo/tix
> Thinking in Tkinter
> I recommend the "Individual programs online"
> http://www.ferg.org/thinking_in_tkinter/index.html
>
>
> b) GUI development tools
>
> ActiveState GUI Builder (using grid layout)
> SpecTcl is the predecessor of GUI Builder (by ActivaState).
> http://spectcl.sourceforge.net/
> FAQ (where to get source)
> http://aspn.activestate.com/ASPN/Mail/Message/komodo-announce/3355346
>
> PAGE v3.0 by Stewart Allen (using placer layout)
> http://page.sourceforge.net/
>
> There are many more for other GUI toolkits mentioned in this post:
> http://mail.python.org/pipermail/python-list/2004-February/250727.html
>
> Finally I decided to use the packer layout and create the widgets
> manually. Just the simplest and quickest way for me.
>
>
> c) How do I ...?
>
> How do I use all methods available in the Tix Grid?
>
> Tix Grid with full implementation of all methods
> http://klappnase.bubble.org/TixGrid/index.html
>
>
> How do I create a multi-column Tix.HList?
>
> import Tkinter as Tk
> import Tix
>
> root = Tix.Tk()
> # setup HList
> hl = Tix.HList(root, columns = 5, header = True)
> hl.header_create(0, text = "File")
> hl.header_create(1, text = "Date")
> hl.header_create(1, text = "Size")
> # create a multi-column row
> hl.add("row1", text = "filename.txt")
> hl.item_create(entry_path, 1, text = "2009-03-26 21:07:03")
> hl.item_create(entry_path, 2, text = "200MiB")
>
> I haven't found out how to right-justify individual columns? Anyone?
>
>
> How to implement Tk GUI with multiple threads?
>
> Usually there are two options to make threads wait for an event:
>
> * gui thread polling (lame)
> see here how to use Tk.after() (actually a Tcl command) to poll
> http://uucode.com/texts/pylongopgui/pyguiapp.html
>
> see here how to imitate the Tk event loop to poll for non-Tk
> events (a socket, for example)
> https://sourceforge.net/project/showfiles.php?group_id=5649&package_id=5704
> Tix8.4.3-src.tar.gz, then look in /Tix8.4.3/Python/Demo/tix/
> tixwidgets.py, find loop()
>
>
> * multithreaded with events (the option to choose)
> Basically this uses bind and event_generate to send "Notify"
> messages to the Tk instance.
> I suspect the following example failed due to not synchronising
> the event_generate call
> http://coding.derkeiler.com/Archive/Python/comp.lang.python/2006-07/msg01479.html
>
> For multithreading Python Tk GUI applications the following rules
> apply:
> 1. same thread calling Tk must do all subsequent GUI calls,
> 2. other threads may send events with send_event to the root Tk
> instance,
> 3. with threading problems you might try to synchonise access to
> event_generate(). Using event_generate() with one non-GUI thread seems
> to be safe.
[toc] | [next] | [standalone]
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Date | 2015-01-03 16:57 -0500 |
| Message-ID | <mailman.17360.1420322282.18130.python-list@python.org> |
| In reply to | #83171 |
On 1/3/2015 1:30 PM, abaskm@gmail.com wrote: > Hi, > > I have had issues running Tix on python 2.7.6 and 3.4.2: > > More details on the issue here. > > http://stackoverflow.com/questions/27751923/tix-widgets-installation-issue > > Has anyone had similar issues with Tix? The current doc is wrong in any case. I opened http://bugs.python.org/issue23156 -- Terry Jan Reedy
[toc] | [prev] | [next] | [standalone]
| From | Christian Gollwitzer <auriocus@gmx.de> |
|---|---|
| Date | 2015-01-04 09:23 +0100 |
| Message-ID | <m8at8k$g39$1@dont-email.me> |
| In reply to | #83181 |
Am 03.01.15 um 22:57 schrieb Terry Reedy: > On 1/3/2015 1:30 PM, abaskm@gmail.com wrote: >> Hi, >> >> I have had issues running Tix on python 2.7.6 and 3.4.2: >> >> More details on the issue here. >> >> http://stackoverflow.com/questions/27751923/tix-widgets-installation-issue >> >> Has anyone had similar issues with Tix? > > The current doc is wrong in any case. I opened > http://bugs.python.org/issue23156 > Tix is a compiled extension, so this tix8.4.3.dll is needed as well as a couple of .tcl file including pkgIndex.tcl, which makes the package available to the Tcl interpreter. tix*.dll was never part of tk*.dll. Note that Tix is LEGACY. There are much better options for its widgets available that are based on ttk. Just to try, I compiled Tix under OSX for my Tk8.6.3 and ran the widget demos. Instead of * Hierarchical Listbox use ttk::treeview, tablelist_tile or tkTreeCtrl, with increasing order of capabilities and install complexity * TList: I think tkTreeCtrl can do it, never have used this layout * CheckList: tablelist can be used with an editable field * Grid widget: use tkTable * NoteBook, PanedWindow, ComboBox, LabelFrame -> ttk::notebook, ttk::panedwindow, ttk::combobox, ttk::labelframe * Balloon: tcllib::tooltip Not to mention that the Tix widgets are extremely ugly, while the widgets from ttk have a near-native look and feel. Caveat emptor: I've never used Tix, so this is just my impression as an experienced Tk programmer from running the widget demo Christian
[toc] | [prev] | [next] | [standalone]
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Date | 2015-01-04 15:45 -0500 |
| Message-ID | <mailman.17381.1420404386.18130.python-list@python.org> |
| In reply to | #83191 |
On 1/4/2015 3:23 AM, Christian Gollwitzer wrote: > Am 03.01.15 um 22:57 schrieb Terry Reedy: >> The current doc is wrong in any case. I opened >> http://bugs.python.org/issue23156 > Tix is a compiled extension, so this tix8.4.3.dll is needed as well as a > couple of .tcl file including pkgIndex.tcl, which makes the package > available to the Tcl interpreter. tix*.dll was never part of tk*.dll. > > Note that Tix is LEGACY. There are much better options for its widgets > available that are based on ttk. Just to try, I compiled Tix under OSX > for my Tk8.6.3 and ran the widget demos. > > Instead of > > * Hierarchical Listbox use ttk::treeview, tablelist_tile or tkTreeCtrl, > with increasing order of capabilities and install complexity > > * TList: I think tkTreeCtrl can do it, never have used this layout > > * CheckList: tablelist can be used with an editable field > > * Grid widget: use tkTable > > * NoteBook, PanedWindow, ComboBox, LabelFrame -> ttk::notebook, > ttk::panedwindow, ttk::combobox, ttk::labelframe > > * Balloon: tcllib::tooltip > > Not to mention that the Tix widgets are extremely ugly, while the > widgets from ttk have a near-native look and feel. > > Caveat emptor: I've never used Tix, so this is just my impression as an > experienced Tk programmer from running the widget demo I copied parts of this response with additional comments in a new tracker post. -- Terry Jan Reedy
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web