Posts: 901
Joined: Feb 2005
Reputation:
3
sometime ago (2005-03-31) we had a discussion that lead to 'madtw' adding in alignment of labels to ControlLabel, he also added them to ControlButton but not 'truncation' which was 'to be done later'
As far as I can tell this hasn't been added. Was it found that it couldn't be done?
I still think truncating label on ControlButton would be useful ?
thanks
BBB
Posts: 3,909
Joined: Dec 2004
Reputation:
20
Nuka1195
Skilled Python Coder
Posts: 3,909
try setting label2 to a space character.
Posts: 901
Joined: Feb 2005
Reputation:
3
label2 on a ControlButton ?
I was referring to the alignment param.
eg. alignment=XBFONT_CENTER_Y|XBFONT_TRUNCATED
Posts: 3,909
Joined: Dec 2004
Reputation:
20
Nuka1195
Skilled Python Coder
Posts: 3,909
2008-05-16, 19:02
(This post was last modified: 2008-05-16, 19:07 by Nuka1195.)
i'm aware of that, you can now setLabel( "label1", label2=" ").
when there is a value in label2 the control button truncates, i don't know if a space will work.
edit: i'm going to submit a patch to make "label" optional, i have need to be able to just set label2.
Posts: 901
Joined: Feb 2005
Reputation:
3
I wasnt aware of label2 and I checked the docs in your sig before posting.
Is it a recent addition ?
still it would be nice to have either label obey the truncated alignment
but if that works, it'll be simpler than manually calc max text length as I do at moment.
thanks
Posts: 3,909
Joined: Dec 2004
Reputation:
20
Nuka1195
Skilled Python Coder
Posts: 3,909
i'm pretty sure that would require a change the the gui control button, not pythons. so would need to be handles by a developer, it might cause problems?