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.
内容、サイズ、位置などがPythonを介して制御されるテキストを表示する単純なコントロールがあります。固定幅でコントロールの正確な高さを計算する方法はありますか?
今私はやっています:
a = total_number_of_characters_in_string b = max_number_of_characters_in_a_line h = a/b
しかし、問題はすべての行が最大で埋められるわけではなく、改行文字もあります。
これを達成する簡単な方法はありますか?