Hi,
After spending almost two hours digging into Spec I couldn't figure out how to change the alignment of the text in LabelModel. As I'm building a simple calculator, the text has to be right-aligned. The default is left-alginement which makes the calculator display look weird. Any help would be much appreciated. best regards Nacho
Nacho
Smalltalker apprentice.
Buenos Aires, Argentina.
|
Hey, I'm not sure this is the good way to do it, but you can store in your labelModel a Text instead of a String: myComposableModel label text: 'someString' asText.
Then you can add attribute to the text: myComposableModel label text addAttribute: TextColor red. myComposableModel label text addAttribute: TextAlignment rightFlush.
Try first with TextColor red, because for TextAlignment rightFlush there might be other reason it does not work (i.e. the label model has the width of the text, so modifying the alignment will not modify anything).
Best, 2013/11/7 nacho <[hidden email]> Hi, |
I checked it seems that TextAlignment is currently broken. Only other text attributes work. sorry.
2013/11/7 Clément Bera <[hidden email]>
|
Yes, it is. Thanks anyway. I'm still trying to figure out this... ;) nacho Lic. Ignacio Sniechowski, MBA On Thu, Nov 7, 2013 at 7:36 PM, Clément Bera <[hidden email]> wrote:
Nacho
Smalltalker apprentice.
Buenos Aires, Argentina.
|
Free forum by Nabble | Edit this page |