in reply to Re: Tk::BrowseEntry -- get() with nothing selected
in thread Tk::BrowseEntry -- get() with nothing selected

It's my understanding that the selection methods of Tk::Listbox modify the selection, and not return it. The curselection() method is not available by default in a Tk::BrowseEntry widget. Is there any way I can override the widget bindings so that the get method is defaulted to the Tk::Entry widget rather than the Tk::Listbox widget?

Any help is appreciated,

<edit>Well, I changed the BrowseEntry.pm to delegate to the entry widget rather than the scrolled listbox. However I would like to find a way to do it without trifling with the default bindings directly, (i.e. a code override rather than hard override)</edit>


Grygonos

Replies are listed 'Best First'.
Re^3: Tk::BrowseEntry -- get() with nothing selected
by eserte (Deacon) on Jun 07, 2004 at 14:43 UTC
    Use Subwidget, i.e. with $browseentry->Subwidget("subwidgetname")->method(...). The BrowseEntry documentation should provide the names of the advertides widgets.

      Yeah I saw that but had no clue how to use them. I figured it would be something like that...so it would be

      $be->Subwidget('entry')->get()

      Thanks for all your help on this,