LabelSpec using ComposedText

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

LabelSpec using ComposedText

Gruenewald, Tom

Hello forum.
First of all, my composed text is working. Thank you. :-) But now I have one more question about ComposedText concerning labels.
I have a dynamic user interface. Its labels are added in the #postBuildWith: method.

aBuilder add: (LabelSpec label: aComposedText layout: aPoint)).

But this does not work. The comment of the LabelSpec says:
[...] Label values may be Strings, Texts, ComposedTexts, or Images. [...] In the case of textual labels, the style property tells the font to be used in rendering the label. If this property is set to #default, the current TextAttributes default font will be used. The other values currently respected are: #small, #large, #system, and #fixed.

It seems that I have to define my ComposedText in the TextAttributes, so I can use it as label.

aBuilder add: ((LabelSpec label: aComposedText layout: aPoint) style: #myComposedText).

Is this true or is there a mistake in the assignment without the style parameter?

Thank you for your answers.

Best regards,
Tom Grünewald


________

Carl Zeiss Industrielle Messtechnik GmbH
Softwareentwicklung/Software Development

T o m G r ü n e w a l d

73446 Oberkochen, Germany
tel: +49.7364.20-8541
fax: +49.7364.20-4800
email: [hidden email]
http://www.zeiss.de/imt

Carl Zeiss Industrielle Messtechnik GmbH
Carl–Zeiss–Straße 22, 73447 Oberkochen
Aufsichtsratsvorsitzender: Dr. Dieter Kurz
Geschäftsführer: Dr. Rainer Ohnheiser, Felix Hoben, Axel Jaeger
Sitz der Gesellschaft: 73446 Oberkochen, Deutschland
Handelsregister: Amtsgericht Ulm, HRB 501561
USt–IdNr.: DE 811 515 346


----------------------------------------
This message is intended for a particular addressee only and may contain business or company secrets. If you have received this email in error, please contact the sender and delete the message immediately. Any use of this email, including saving, publishing, copying, replication or forwarding of the message or the contents is not permitted.


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

Reply | Threaded
Open this post in threaded view
|

Re: LabelSpec using ComposedText

Travis Griggs-4

On Nov 10, 2010, at 8:13 AM, Gruenewald, Tom wrote:

Hello forum.
First of all, my composed text is working. Thank you. :-) But now I have one more question about ComposedText concerning labels.
I have a dynamic user interface. Its labels are added in the #postBuildWith: method.

aBuilder add: (LabelSpec label: aComposedText layout: aPoint)).

But this does not work. The comment of the LabelSpec says:
[...] Label values may be Strings, Texts, ComposedTexts, or Images. [...] In the case of textual labels, the style property tells the font to be used in rendering the label. If this property is set to #default, the current TextAttributes default font will be used. The other values currently respected are: #small, #large, #system, and #fixed.

It seems that I have to define my ComposedText in the TextAttributes, so I can use it as label.

aBuilder add: ((LabelSpec label: aComposedText layout: aPoint) style: #myComposedText).

Is this true or is there a mistake in the assignment without the style parameter?

Thank you for your answers.

Best regards,
Tom Grünewald


There's a subtle error in the comment. *In this context*, a ComposedText should not be thought of as a "textual label" but just as a VisualComponent. The LabelSpec can be any sort of VisualComponent. If it's anything other than a CharacterArray (Text or String), you want to set hasCharacterOrientedLabel: false.

--
Travis Griggs
Objologist
"I did not have time to write you a short program, so I wrote you a long one instead."


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc