Are there any meta-widget addons to Python/Tk? 
Author Message
 Are there any meta-widget addons to Python/Tk?

     Hello:

    I am writing a rather complex UI in Python/Tkinter, and came across
a need to have more a more advanced listbox widget - with support for
colors, font tags, etc. There are a number of meta-widgets that do that
available for  Tcl/Tk, but I can't seem to find anything like that for
Python.

   I am sure that I'm not the only one interested in this
functionality, so I would like to hear how other people have dealt with
it and is there anyone who has implemented / currently implementing this
kind of meta-widgets for Python?

   Thank you very much,

   Roman

   PS Please get rid of '!' in the reply-to address, rudimental spam
protection - sorry about the inconvenience. Thanks! :-)

--
Roman Sulzhyk



Fri, 21 Apr 2000 03:00:00 GMT  
 Are there any meta-widget addons to Python/Tk?

Quote:
>     I am writing a rather complex UI in Python/Tkinter, and came across
> a need to have more a more advanced listbox widget - with support for
> colors, font tags, etc. There are a number of meta-widgets that do that
> available for  Tcl/Tk, but I can't seem to find anything like that for
> Python.

>    I am sure that I'm not the only one interested in this
> functionality, so I would like to hear how other people have dealt with
> it and is there anyone who has implemented / currently implementing this
> kind of meta-widgets for Python?

I wrote an "IconListBox" within the framework of Pmw. Basically, this is
a Tkinter.Canvas with items consisting of a small Tix.Pixmap to the left and
a Tkinter.Label to the right.

Most of the functionality isn't affected when you take out the Pixmap code
and add fancier treatment of the text. Note that you can only set one font
and one color for the labels as they are based on Canvas.create_text.

If you need more than that you'll have to derive your listbox from the Text
widget. [...an hour later: hmm, rewriting the IconListBox as a TextListBox
is pretty straightforward. My bottleneck problem now is to find a way to
convert event.y information to the index of the line that is clicked on.
I have work to do now, but I'll see into the matter tonight. 't would be
nice if I had some tips regarding the mentioned problem by then ...hint..]

cjr

(You'll find the IconListBox in my starship cabin in the PmwExt package:
http://starship.skyport.net/crew/cjr. If you don't have Pmw yet, you can
find it at: http://www.dscpl.com.au/pmw/)

--



Sun, 23 Apr 2000 03:00:00 GMT  
 Are there any meta-widget addons to Python/Tk?

Quote:

>If you need more than that you'll have to derive your listbox from the Text
>widget. [...an hour later: hmm, rewriting the IconListBox as a TextListBox
>is pretty straightforward. My bottleneck problem now is to find a way to
>convert event.y information to the index of the line that is clicked on.
>I have work to do now, but I'll see into the matter tonight. 't would be
>nice if I had some tips regarding the mentioned problem by then ...hint..]


(been there, done that, am writing a book about it ;-)

Cheers /F



Sun, 23 Apr 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. ANNOUNCE: Addons to the Linux Python 1.5 RPMS (RedHat 5.0) [Update 2]

2. entry meta-widget

3. grab a tix meta-widget.

4. Meta-chars in Entry-widgets not working...

5. Trouble binding Meta sequences to entry widget.

6. BlackBox Meta: accessing methods through Meta

7. meta-circular-meta-interpreters (long)

8. #\Meta #\Control #\Meta-Control etc.

9. Slogging toward pgplot/tk widget for Python

10. Notebook widget in Python/TK...

11. using custom tcl/tk image widget from python ?

12. ANNOUNCE: Threads in Tcl/Tk, Metawidgets, and more

 

 
Powered by phpBB® Forum Software