Pmw ScrolledText- question about text cursor

Richard Chamberlain richard_chamberlain at ntlworld.com
Sun Aug 6 18:30:35 EDT 2000


Rob wrote:
> 
> When I create a Scrolled Text Widget, the text cursor
> doesn't appear until I click on the widget with the mouse.
> Only then will the widget accept input from the keyboard.
> 
> How can I have the text cursor appear automatically when the
> widget starts up?
> 
> I am making a mini console for my program with this widget
> and I want to be able to enter text as soon as it appears.
> 
> Thanks,  Rob.
> 
> * Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping.  Smart is Beautiful


Hi Rob,

You can get to a component of a Pmw widget via
widget.component(componentname). So in your case you want to do
something like:

myScrolledText.component('text').focus_set()

Richard



More information about the Python-list mailing list