From: Scott, Keana C. <Keana.S<cott@ce...> - 2004-03-05 14:10:24
Thanks for your suggestions. I had already tried referencing the =
callback function but didn't work. It almost seems like the parent =
frame is not allowing the ListBox to intercept any event, since the =
dblclickcommand or explicit Button-1 event binding is working. Other =
button objects on the same frame behave correctly.
From: Greg McFarlane [mailto:gregm@...]
Sent: Friday, March 05, 2004 5:11 AM
To: Scott, Keana C.
Subject: Re: [Pmw-general] ScrollListBox selectioncommand
Your immediate problem is the call to "selectioncommand=3Dself.click()"
when you create the listbox. You should not call the click method,
but only reference it, like this: "selectioncommand=3Dself.click".
Have a look at the Pmw demos for more help. In particular the
ScrolledListBox demo and the ComboBox demo.
On Thu 04 Mar 2004 at 10:42:12AM -0500, Scott, Keana C. wrote:
> I am trying to use Pmw's ScrollListBox to display a list of image
> filenames. Content of the selected file is displayed on the viewer
> window as the user scrolls around the list. I am trying to use the
> selectioncommand to detect the select event, but I can't get it to
> work. Can someone tell me what I am doing wrong?
> I am using Pmw 1.1. and the following is the snippet of my code.
> class myapp(Pmw.MegaWidget):
> def __init__(self, **kw):
> Pmw.MegaWidget.__init__(self, parent=3Dself.root)
> def createListBox(self):
> self.listBox =3D self.createcomponent('listbox', (), None,
> Pmw.ScrolledListBox, (self._hull,), =
> self.listBox.pack(side=3DTOP, fill=3DBOTH, expand=3DYES, padx=3D2, =
> def click(self):
> print 'clicked'
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> Pmw-general mailing list
Greg McFarlane Really Good Software Pty Ltd Sydney Australia =