> It seems that this could be handled fairly straight-forwardly by
subclassing either Listbox or Frame to implement your own, custom widget.
I will freely admit that I am far from facile with Tk widgets. I've been
using GTK for most GUI apps for a long while (when I need to write such
things), but
On Thu, Oct 10, 2013 at 2:29 PM, Skip Montanaro wrote:
> > Removing inappropriate entries is not much of a hack.
>
> True, but then I have to go through the trouble of adding them back in
> should they become valid again. :-)
>
It seems that this could be handled fairly straight-forwardly by
sub
> Removing inappropriate entries is not much of a hack.
True, but then I have to go through the trouble of adding them back in
should they become valid again. :-)
Skip
--
https://mail.python.org/mailman/listinfo/python-list
On Thu, Oct 10, 2013 at 4:37 PM, Skip Montanaro wrote:
> Thanks. "disabled" did the trick. Turns out you can't disable
> individual items. Instead, you have to (hackishly) change the display
> of entries somehow to indicate their inappropriateness...
Removing inappropriate entries is not much of
> Other synonyms from GUI toolkits are "inactive" and "disabled". I
> don't know if that'll be any help though.
Thanks. "disabled" did the trick. Turns out you can't disable
individual items. Instead, you have to (hackishly) change the display
of entries somehow to indicate their inappropriateness
On Fri, Oct 11, 2013 at 12:50 AM, Skip Montanaro wrote:
> Does Tk
> perhaps use a word other than "insensitive" to describe an item which
> you'd normally be able to click?
Other synonyms from GUI toolkits are "inactive" and "disabled". I
don't know if that'll be any help though.
ChrisA
--
http
I have a pair of Listboxes, each with ranges of the same text. For example:
ABCABC
DEFDEF
GHIGHI
JKLJKL
(My apologies, I'm sure Gmail is going to butcher that.)
If I select "ABC" from the first list, only the last three values in
the second list are appropriate selections. Is th
On Tuesday, July 17, 2012 8:55:21 AM UTC-5, Sarbjit singh wrote:
> I am having a problem configuring a listbox widget such that the selection
> remains highlighted even while it is set (programmatically) to the DISABLED
> state. Below code shows the problem:
>
> from Tkinter import *
> master =
On Tuesday, July 17, 2012 06:55:21 AM Sarbjit singh wrote:
> I am having a problem configuring a listbox widget such that the selection
> remains highlighted even while it is set (programmatically) to the
DISABLED
> state. Below code shows the problem:
>
> from Tkinter import *
> master = Tk()
>
I am having a problem configuring a listbox widget such that the selection
remains highlighted even while it is set (programmatically) to the DISABLED
state. Below code shows the problem:
from Tkinter import *
master = Tk()
listbox = Listbox(master)
listbox.pack()
listbox.insert(END, "Text1")
Hi all,
I am building a simple tool using tkinter,and need multiselection
checklist.I find that Listbox with option selectmode=tkinter.MULTIPLE could
do this for me.
But when I have two Listboxs,I do some selection with one,then do selection
with another one,the previous listbox get cleared.I wo
On Jun 21, 6:36 pm, rantingrick wrote:
> On Jun 21, 12:36 am, Anthony Papillion wrote:
>
> > So I'm trying to add a Listbox to my window. I want it to be the width
> > of my window and the height of my window. I'm using the following
> > code ('root' is my toplevel window):
>
> > gsItems = Listb
Thank you, RantingRick and EB303. Much appreciated and it looks like
it works fine now. Still learning but I am amazed every single day how
simple Python is!
Thanks Again,
Anthony Papillion
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 21, 12:36 am, Anthony Papillion wrote:
> So I'm trying to add a Listbox to my window. I want it to be the width
> of my window and the height of my window. I'm using the following
> code ('root' is my toplevel window):
>
> gsItems = Listbox(root, width=root.winfo_width(),
> height=root.win
On Jun 21, 7:36 am, Anthony Papillion wrote:
> So I'm trying to add a Listbox to my window. I want it to be the width
> of my window and the height of my window. I'm using the following
> code ('root' is my toplevel window):
>
> gsItems = Listbox(root, width=root.winfo_width(),
> height=root.winf
So I'm trying to add a Listbox to my window. I want it to be the width
of my window and the height of my window. I'm using the following
code ('root' is my toplevel window):
gsItems = Listbox(root, width=root.winfo_width(),
height=root.winfo_height())
gsItems.pack()
While you would think this co
On Fri, 21 May 2010 08:02:30 +1000, John McMonagle
wrote:
>s...@home.com wrote:
>
>> I have made the modifications and it does print inside the listbox,
>> however they are all printed on the same line.
>>
>
>Sorry, I didn't realize askopenfilenames returned the filenames as a
>whitespace sepa
s...@home.com wrote:
> I have made the modifications and it does print inside the listbox,
> however they are all printed on the same line.
>
Sorry, I didn't realize askopenfilenames returned the filenames as a
whitespace separated string, on my system they are returned as a tuple
of strings.
On Thu, 20 May 2010 15:36:59 +1000, John McMonagle
wrote:
>r...@home.com wrote:
>> Hello,
>>
>> My first attenpt at a simple python Tkinter application. I wanted to
>> see how to load file names into a listbox from a menu. This is what I
>> got until the part of displaying the file names in a l
r...@home.com wrote:
> Hello,
>
> My first attenpt at a simple python Tkinter application. I wanted to
> see how to load file names into a listbox from a menu. This is what I
> got until the part of displaying the file names in a listbox, which I
> could not figfure out how to do?
>
> Any help w
Hello,
My first attenpt at a simple python Tkinter application. I wanted to
see how to load file names into a listbox from a menu. This is what I
got until the part of displaying the file names in a listbox, which I
could not figfure out how to do?
Any help would be appreciated. Trying to do thi
Opps: found a few errors in that last ScrolledListbox class, try this
one...
import Tkinter as tk
from Tkconstants import *
class ScrolledList(tk.Listbox):
def __init__(self, master, **kw):
self.frame = tk.Frame(master)
self.frame.rowconfigure(0, weight=1)
self.frame
* Alf P. Steinbach:
In case Someone Else(TM) may need this.
This code is just how it currently looks, what I needed for my code, so
it's not a full-fledged or even tested class.
But it works.
That code evolved a little to cover more Tk listbox quirks (thanks to Ratingrick
for the "actives
On Mar 1, 6:19 am, "Alf P. Steinbach" wrote:
> > kw.setdefault('activestyle', 'none')
>
> Hm, let me steal this line... Thanks!
Yes! the default activestyle is quite annoying!
--
http://mail.python.org/mailman/listinfo/python-list
* rantingrick:
kw.setdefault('activestyle', 'none')
Hm, let me steal this line... Thanks!
Cheers,
- Alf
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 28, 9:57 pm, "Alf P. Steinbach" wrote:
> * rantingrick:
I just hate overriding all the paths to each listbox method. How about
just overideing the Listboxe's geomerty methods once an your done?
#-- start script --#
import Tkinter as tk
from Tkconstants import *
import tkMessageBox as MB
outside their bounding box. I guess that
could be fixed up somehow by overriding this and that, but I find it simpler to
just make the enclosing widget the widget that one has a reference to. And in a
way it's also good that it's more laborious to directly access the tkinter
listbox s
On Feb 28, 6:30 pm, "Alf P. Steinbach" wrote:
> In case Someone Else(TM) may need this.
>
> This code is just how it currently looks, what I needed for my code, so it's
> not
> a full-fledged or even tested class.
Thanks for sharing Alf,
Thats works fine "as-is" but what about inheriting from "t
In case Someone Else(TM) may need this.
This code is just how it currently looks, what I needed for my code, so it's not
a full-fledged or even tested class.
But it works.
import tkinter as t
import tkinter.simpledialog
import tkinter.messagebox
t.askstring = tkinter.simpledialog.askstr
<[EMAIL PROTECTED]> wrote:
> On May 29, 2:02 pm, [EMAIL PROTECTED] wrote:
> > Hi,
> > Is it possible to havedifferentitems in alistboxindifferentcolors? Or is it
justonecolor for all items in alistbox?
> > Thanks
> > Rahul
>
> from Tkinter import *
>
> root = Tk()
> l = Listbox(root)
> l.pack()
On May 30, 6:04 am, [EMAIL PROTECTED] wrote:
> On May 29, 2:02 pm, [EMAIL PROTECTED] wrote:
>
> > Hi,
> > Is it possible to havedifferentitems in alistboxindifferentcolors? Or is it
> > justonecolor for all items in alistbox?
> > Thanks
> > Rahul
>
> from Tkinter import *
>
> root = Tk()
> l = Lis
On May 29, 2:02 pm, [EMAIL PROTECTED] wrote:
> Hi,
> Is it possible to havedifferentitems in alistboxindifferentcolors? Or is it
> justonecolor for all items in alistbox?
> Thanks
> Rahul
from Tkinter import *
root = Tk()
l = Listbox(root)
l.pack()
for x in range(10):
l.insert(END, x)
l.item
On Tue, 29 May 2007 19:02:03 +0200, <[EMAIL PROTECTED]> wrote:
> Hi,
> Is it possible to have different items in a listbox in different
> colors? Or is it just one color for all items in a listbox?
> Thanks
> Rahul
>
AFAIK, this is not possible with a listbox. You can however quite easily
emula
<[EMAIL PROTECTED]> wrote:
> Hi,
> Is it possible to have different items in a listbox in different
> colors? Or is it just one color for all items in a listbox?
> Thanks
> Rahul
You specify text and foreground colour when you make the box,
so I don't think its possible.
- Hendrik
--
http://
On May 29, 12:02 pm, [EMAIL PROTECTED] wrote:
> Hi,
> Is it possible to have different items in a listbox in different
> colors? Or is it just one color for all items in a listbox?
> Thanks
> Rahul
Looks like it has to be the same color and font:
http://www.pythonware.com/library/tkinter/introduct
Hi,
Is it possible to have different items in a listbox in different
colors? Or is it just one color for all items in a listbox?
Thanks
Rahul
--
http://mail.python.org/mailman/listinfo/python-list
Gigs_ wrote:
> I have two listbox on frame, and at same time i need to use one option
> from both listbox. But when I click on first than on second listbox
> first get deselected.
>
> How to make this? Is it possiblE?
i found, just need to use exportselection=0
--
http://mail.python.org/mailman
I have two listbox on frame, and at same time i need to use one option from
both
listbox. But when I click on first than on second listbox first get deselected.
How to make this? Is it possiblE?
--
http://mail.python.org/mailman/listinfo/python-list
Hi!
Im working on paint program with tkinter canvas.
I have two listbox and when i click on first listbox second become deselected.
I need to take one thing from first listbox and one thing from second at the
same time.
How to do that?
thx, apologies for bad english
--
http://mail.python.org/
James Stroud wrote:
> A "cross platform" work-around might be to grid a frame at the row and
> column of self.Main and pack the Listbox into the Frame. I don't have a
> Mac at work to test this, however. But I would be curious to know your
> results if you try it.
Thank you for the sub-frame su
Ben Collver wrote:
> I am using Darwin 10.4.9, tcl 8.4.7, tk 8.4, and python 2.3.5. I have
> also tried Python 2.5 on Darwin, Debian, and Fedora Core 6.
>
> I am working on a GUI front-end to a Python program of mine. It is a
> simple grid with labels in the left column and input widgets in th
I am using Darwin 10.4.9, tcl 8.4.7, tk 8.4, and python 2.3.5. I have
also tried Python 2.5 on Darwin, Debian, and Fedora Core 6.
I am working on a GUI front-end to a Python program of mine. It is a
simple grid with labels in the left column and input widgets in the
right column. One of the
On Monday 12 March 2007 20:34, Steve Potter wrote:
> I am trying to find some method of attaching a
> Listbox object to a list object so as the
> contents of the list are changed the contents
> of the Listbox will be updated to match. I
> have found a few references to something like
> this in thi
Steve Potter wrote:
> I am trying to find some method of attaching a Listbox object to a
> list object so as the contents of the list are changed the contents of
> the Listbox will be updated to match. I have found a few references
> to something like this in this old post
> http://groups.google.c
I am trying to find some method of attaching a Listbox object to a
list object so as the contents of the list are changed the contents of
the Listbox will be updated to match. I have found a few references
to something like this in this old post
http://groups.google.com/group/comp.lang.python/brow
On 12/23/06, Kevin Walzer <[EMAIL PROTECTED]> wrote:
I'm trying to set the active item in a Tkinter listbox to my
application's currently-defined default font.
Here's how I get the fonts loaded into the listbox:
self.fonts=list(tkFont.families())
self.fonts.s
"Kevin Walzer" <[EMAIL PROTECTED]> wrote:
> I'm trying to set the active item in a Tkinter listbox to my
> application's currently-defined default font.
not sure if you can mix fonts in a listbox - the font option
when you create the listbox instance seems to
James Stroud wrote:
> Kevin Walzer wrote:
>
>> I'm trying to set the active item in a Tkinter listbox to my
>> application's currently-defined default font.
>>
>> Here's how I get the fonts loaded into the listbox:
>>
>> self.fonts=list(
Kevin Walzer wrote:
> I'm trying to set the active item in a Tkinter listbox to my
> application's currently-defined default font.
>
> Here's how I get the fonts loaded into the listbox:
>
> self.fonts=list(tkFont.families())
> self.fonts.
I'm trying to set the active item in a Tkinter listbox to my
application's currently-defined default font.
Here's how I get the fonts loaded into the listbox:
self.fonts=list(tkFont.families())
self.fonts.sort()
for item in self.fonts:
self.fontlist.i
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote:
In the meantime, I have produced this evil hack, that takes advantage of the
difference in pixel widths between the space, and either the fullstop or the
single quote...
It will only work if you have quite a lot of space to waste between columns, an
"Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote:
> "Fredrik Lundh" <[EMAIL PROTECTED]> wrote:
>
> > instead of trying to force the listbox to behave like a multicolumn
> > widget, maybe you could switch to another widget? some alternatives include
> >
> > a Text widget (you have to roll your
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote:
> instead of trying to force the listbox to behave like a multicolumn
> widget, maybe you could switch to another widget? some alternatives include
>
> a Text widget (you have to roll your own selection logic)
I _really_ don't feel strong enough
Hendrik van Rooyen wrote:
> Is there a way to format this so it will line up with *any* font ?
>
> I would prefer not to give up and use a fixed width font - it looks so
> teletypish...
sounds like contradicting requirements to me.
instead of trying to force the listbox to behave like a multi
I am populating a listbox from a directory that looks like this:
variable_dict = {"funny_long_or_short_variable_name_as_key": (2,45),..
the tuple represents a "card, line" pair.
medf is a font object and a forward reference here.
I write:
for x in variable_dict:
txt = x
while medf.m
<[EMAIL PROTECTED]> wrote by email:
Please keep it on the list...
| Hi,
| Hi and Thanks for all your help,everything work.But I have one
| question,in string I am "new",and I don't know how to exactly split:
|
| example:
|
| '-rw-r--r-- 1 [EMAIL PROTECTED]
| v-programs.byethost31.com 2376
<[EMAIL PROTECTED]> wrote:
| Hi,
| Again I need help about tkinter listbox.
|
|
| example:
|
| In listbox must write (imaginary file in server):
|
| ['-rw-r--r-- 1 [EMAIL PROTECTED] vedran.byethost12.com
| 3506 Jun 25 14:40 file.gif']
|
|
| and then when somebody click on
Hi,
Again I need help about tkinter listbox.
example:
In listbox must write (imaginary file in server):
['-rw-r--r-- 1 [EMAIL PROTECTED] vedran.byethost12.com
3506 Jun 25 14:40 file.gif']
and then when somebody click on file in listbox,then in new Entry
widget must
write jus
<[EMAIL PROTECTED]> Wrote:
| Hi,
| I need help about Tkinter listbox widget.I want,when somebody click on
| any item(file) in Listbox,then in new Label widget text must be
| selected item from server.
|
| my program (wrong example):
|
| import ftputil
| import Tkinter
| root=Tkin
Hi,
I need help about Tkinter listbox widget.I want,when somebody click on
any item(file) in Listbox,then in new Label widget text must be
selected item from server.
my program (wrong example):
import ftputil
import Tkinter
root=Tkinter.Tk()
ftp=ftputil.FTPHost('some imaginary server
On Fri, 1 Jul 2005 20:19:20 -0400, Ron Provost <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I've written a simple GUI which contains a listbox to hold some information.
> I've found that the click-selection schemes provided by Tkinter are
> insufficient for my needs. Essentiall I need to impletement a
Hello,
I've written a simple GUI which contains a listbox to hold some information.
I've found that the click-selection schemes provided by Tkinter are
insufficient for my needs. Essentiall I need to impletement a custom
selectMode. As a first go, I've attempted to implement a click-on-click-
This isn't an option in the stock Tk listbox or any of the alternatives
I know of offhand (bwidget ListBox, TixTList). The TkTable widget,
which can also display multiple columns, can select different
justifications, either for the whole table, or for single cells.
I've never used TkTable with Pyt
I've searched high
and low, and I can't seem to find a way to center or right justify the text in a
Listbox widget using TkInter. The justify option is unrecognized.
Any options I'm missing, or a known work-around?
Thanks!
Kyle
--
http://mail.python.org/mailman/listinfo/python-list
Thanks for the hint. But I did not try such *advance* techniques so
far.
Both Delete-then-insert and Insert-then-delete work for me.
Interestingly, I found Delete-then-insert can cause some flicking when
replacing items near bottom, while Insert-then-delete always works
fine.
Zhang Le
--
http://
To the best of my knowledge, the only way to do this is as you describe: delete
the old item, then insert the new item. The Tk manpage for "listbox" doesn't
describe any commands to only update an item in the list.
Actually, you may have another choice, if your Tk is new enough---Tk supports
(in
Hello,
Is there a quick way to replace the content of a single item in
tkinter's listbox? Currently my solution is to first delete the item,
then insert a new item at the same position. I think there may be
better way.
Zhang Le
--
http://mail.python.org/mailman/listinfo/python-list
67 matches
Mail list logo