S
steven
Hello,
I'm having some difficulties with labels. Suppose I have 2 labels, with
a random text in the default font (Microsoft Sans Serif). I want to
place them next to each other, with minimal space between them. So I
want to set the size of the first label so that the text exactly fits in
the label. With this size, I can afterwards set the location of the
second label so that my goal is achieved (place these labels exactly
next to each other).
How can I set the size of a label so that it exactly fits the text ?
l = new label
l.text = "Some random text"
l.location = new point(10, 10)
l.size = new size (X, Y) <= THESE X and Y have to be calculated
me.controls.add(l)
thank you
Steven
I'm having some difficulties with labels. Suppose I have 2 labels, with
a random text in the default font (Microsoft Sans Serif). I want to
place them next to each other, with minimal space between them. So I
want to set the size of the first label so that the text exactly fits in
the label. With this size, I can afterwards set the location of the
second label so that my goal is achieved (place these labels exactly
next to each other).
How can I set the size of a label so that it exactly fits the text ?
l = new label
l.text = "Some random text"
l.location = new point(10, 10)
l.size = new size (X, Y) <= THESE X and Y have to be calculated
me.controls.add(l)
thank you
Steven