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.
何らかの理由で解決できない単純な問題があります。高さ 600 ピクセル (幅は関係ありません) のウィンドウと高さ 90 ピクセルのボタンがあります。私が必要とするのは、さまざまな量のボタンを使用して、画面上のボタンを均等に配置できることです。たとえば、ボタンが 1 つある場合は中央に配置し、それ以上に離します。(600 - (90 * #ofbuttons)) / (#ofbuttons + 1) を試しましたが、うまくいきませんでした。任意の助けをいただければ幸いです。
簡単にどうですか:
center_of_button_i = 600*i/(n+1)