Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Perl/Tk でTextウィジェットの行番号と列番号を教えてくれる方法はありますか?
documentationによると、ウィジェットにはindex()、ウィジェット内のさまざまな位置の「line.char」を返すメソッドがあります。挿入カーソルの現在の位置を取得するには、特別なマーク「insert」の名前を渡します。特別なマーク「current」の名前を渡して、マウスの現在の位置を取得します。
index()
あなたの質問は、あなたが望む2つのどちらかを明確にしていません。