次のウィジェットにフォーカス

By ctrans | 2009-10-01

いつもやり方を忘れるTkのフォーカスまわり。
エンターキーを押下した際、次のウィジェットにフォーカスを移動させたい場合は、tk_focusNextを使います。

bind $w <return> {
	focus [tk_focusNext [focus]]
	break
}

自分のためにメモφ(。_。)メモ

web拍手

Leave Your Comment

Your email will not be published or shared.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">