Events - newbie 
Author Message
 Events - newbie

Hi,

I'm creating a GUI using Tk. I'm starting to require some way of running
code based on a BrowseEntry having an item selected from the dropdown.

I can't find any way in which Perl provides for this, I'm sure it must have
some kind of event system, but I can't find any obvious hints on how to go
about this.

Any help would be appreciated.

Thanks



Sat, 05 Jul 2003 20:45:18 GMT  
 Events - newbie

Quote:

> I'm creating a GUI using Tk. I'm starting to require some way of running
> code based on a BrowseEntry having an item selected from the dropdown.

> I can't find any way in which Perl provides for this, I'm sure it must have
> some kind of event system, but I can't find any obvious hints on how to go
> about this.

Perl/Tk does have events.  You'll read the Tk::event and Tk::bind
man pages to learn about them.  Nonetheless, it seems that your
problem can be solved using the -browsecmd option of BrowseEntry.
Here is its description from the Tk::BrowseEntry man page:

        -browsecmd

        Specifies a function to call when a selection is made in the
        popped up listbox.  It is passed the widget and the text of
        the entry selected. This function is called after the entry
        variable has been assigned the value.

--
Marc Dashevsky  (remove "_" from address to reply by e-mail)



Sat, 05 Jul 2003 21:14:23 GMT  
 Events - newbie
Please IGNORE this, sorry I just found out how to do it.

Thanks


Quote:
> Hi,

> I'm creating a GUI using Tk. I'm starting to require some way of running
> code based on a BrowseEntry having an item selected from the dropdown.

> I can't find any way in which Perl provides for this, I'm sure it must
have
> some kind of event system, but I can't find any obvious hints on how to go
> about this.

> Any help would be appreciated.

> Thanks



Sat, 05 Jul 2003 21:29:57 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Pigheadedness (was Re: Newbie; Perl/Tk Event models)

2. Newbie: Mouse events

3. Newbie question on creating a delay event

4. Events .. (newbie)

5. Newbie; Perl/Tk Event models

6. POE 0.11: event driven state machines, also supports Perl/Tk and Event

7. HTML::Parser 3.07 text events vs token events

8. Processing other events while waiting for an event to happen

9. acting on non event-oriented events

10. file events vs. window events

11. Can't load 'C:/perl/site/lib/auto/Tk/Event/Event.dll' for module Tk::Event:

12. Again:Fileevent problem in Tk800.008 ? AND:How to put port events and user events together

 

 
Powered by phpBB® Forum Software