Sorry, I previously forgot to join the file…
I
cannot manage to draw vertical static lines onto a panel (see code) : while position and size can be modified, the line shows always horizontally ! Please, who can help and tell what am I doing wrong ?
On 28 November 2014 at 18:20, Démètre Pierre wrote:
Sorry, I previously forgot to join the file…
I
cannot manage to draw vertical static lines onto a panel (see code) : while position and size can be modified, the line shows always horizontally ! Please, who can help and tell what am I doing wrong ?
Maybe you should give your vertical line a bit more room than just 20 pixels:
I
cannot manage to draw vertical static lines onto a panel (see code) : while position and size can be modified, the line shows always horizontally ! Please, who can help and tell what am I doing wrong ?
Thank you, I discovered this due to infinity77’s answer, although this was not as precise as yours ! Nevertheless, I think this approach (size=(wide, tall)) inconvenient, since it depends upon a convention over display’s orientation… The (length, thickness) should be more appropriate to describe a line, don’t you think ?
···
Le samedi 29 novembre 2014 08:41:12 UTC+1, Tim Roberts a écrit :
I
cannot manage to draw vertical static lines onto a panel (see code) : while position and size can be modified, the line shows always horizontally ! Please, who can help and tell what am I doing wrong ?
The size (300,2) means 300 pixels wide and 2 pixels tall. If you want a vertical line, you should reverse those to (2,300).
Thank you, I discovered this due to infinity77's answer, although this was not as precise as yours ! Nevertheless, I think this approach (size=(wide, tall)) inconvenient, since it depends upon a convention over display's orientation... The (length, thickness) should be more appropriate to describe a line, don't you think ?
Probably, but then a standard wx.Size couldn't be used.
BTW, you could also do it using sizers in which case you don't specify the size at all. See attached, I use wx.lib.sized_controls but you could also do it by defining the sizers your self.
You can find more details on the Phoenix documentation, note that not everything applies to classic but I still think there are easier to follow then the older docs.