On Wednesday, July 18, 2012 3:09:15 PM UTC-5, Googie wrote:
> Hi,
>
> I just noticed that if I use multiline text for a label and ttk::label, they behave differently in case parent frame/toplevel shrinks (in regards of a width).
> The [label] shows as much text as is possible, but [ttk::label] hides lines other than first, which is weird to me.
>
> Example to reproduce:
>
> ttk::label .l1 -text "this is a test of a long line\nwith multiple lines" -justify left
> label .l2 -text "this is a test of a long line\nwith multiple lines" -justify left
> pack .l1 .l2
>
> Now resize the toplevel so labels won't fit in width, but leave enough height. You will see that only [ttk::label] hides second line.
>
> Does it happen to you too?
>
> There is also second, minor difference - [label] sticks always center of the label and [ttk::label] sticks always left side of the label. In result when you resize the window, the [label] seems to be moving, while [ttk::label] stays at it's place.
>
> Second difference is not so much disturbing. Well, at least not for my needs ;)
>
> Regards,
> Pawel
Regarding the 2nd line of the ttk::label disappearing when crowded - I do see it here (Win7 8.4.9), but don't necessarily have an explanation.
Regarding the text location differences between the two labels... It looks like the ttk::label must default to "-anchor w" while the tk label must default to "-anchor c". Explicitly setting a common anchor value on both controls should make them react the same in this regard.
Jeff