1

I am flailing about with wxWidgets, in particular, the wx.Sizer in wxPython. I have read the documents, I have a copy of wXPython in Action before me, and have set aside the problem to work on other things a better mental model of sizers hopefully gestated within my skull. None of this has worked.

I am not grokking, or even getting to the point where I can bang about usefully, how sizers work. In HTML, I could at least set a background color on some div or td, or call forth borders so I could see how things are laid out. Here, I have a grey expanse and no idea which of the nested static box sizers from which it originates. I am giving static box sizers after making a mess out of the grid bag sizers.

Either alternative would let me at least get a handle on how these work.

4

1 に答える 1

0

問題の答えではありませんが、サイザーがどのように機能するかを理解するための良い方法は、Code :: Blocksをインストールし、wxSmithプラグインを使用してインターフェイスを設計することです(Code :: Blocksにバンドルされていると思います)。Code :: Blocksは、すべての主要なプラットフォームで利用できます。

wxSmithは、使用しているサイザーを赤い境界線で強調表示することにより、リアルタイムで表示します。

追加の利点として、wxSmithは、手動で行うのではなく、GUIコードを生成するのに最適です。

于 2010-03-30T03:35:51.730 に答える