| Rich Duzenbury 2004-10-01, 8:56 pm |
| Awesome! Just what I needed. Thank you.
I was wandering around looking for a '-name' property with some kind of
find_widget_by_name method. Tk chooses to call that 'Advertise' and
'Subwidget'. A bit odd to me, but does exactly what I need.
Now I can let the user click on the error and be directed to the proper
entry field:
$lb->bind('<<ListboxSelect>>' => sub {
$lb->get($lb->curselection) =~ /^(DLG\d+)/;
$prefs_frame->Subwidget($1)->focus;
});
On Fri, 2004-10-01 at 12:30, Michael van Nieuwenhuize wrote:
> Rich,
>
> One way that I have done it in the past is use the Advertise method to tag
> a sub-widget with a name.
> When I want to retrieve this widget I then use subwidget("advertised_name")
> to get a ref to it. You can
> find this in Master Perl Tk chapter 14. These are methods mainly used for
> mega-widget creation but
> works like this as well.
--
Regards,
Rich
Current Conditions in Des Moines, IA
Overcast
Temp 64.4F
Winds out of the Southwest at 12mph
Light Rain Moderate Mist
-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server. If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to majordomo@lists.stanford.edu
|