S
Stuart Norris
Dear Readers,
I am attempting to draw box around some text using unicode on
multiline label. The label is forty characters wide and 12 lines deep.
I have been trying to draw a box around text (centered in the label)
on this label.
My font on this label is Courier new - hence fixed width character
cells.
I have tried using the Box Drawing unicode in with the Courier new
font, \u250c, \u2500, \u2510 etc.
this.Label.Text="\u250f\u2501\u2513\r\n\u2503 \u2503";
However there is a gap between the characters?
-----------
| Label |
-----------
Is there a way to draw a proper box around text on a label with
Courier new font using unicode?
Alternatively is it possible to draw the text labels yourself like
ownerdrawn menu buttons?
Where I calculate the width and height of the label and my text size
in the required font and then
draw a rectangle around my text in the centre of the label? Any
examples?
Any suggestion most welecome.
Stuie
I am attempting to draw box around some text using unicode on
multiline label. The label is forty characters wide and 12 lines deep.
I have been trying to draw a box around text (centered in the label)
on this label.
My font on this label is Courier new - hence fixed width character
cells.
I have tried using the Box Drawing unicode in with the Courier new
font, \u250c, \u2500, \u2510 etc.
this.Label.Text="\u250f\u2501\u2513\r\n\u2503 \u2503";
However there is a gap between the characters?
-----------
| Label |
-----------
Is there a way to draw a proper box around text on a label with
Courier new font using unicode?
Alternatively is it possible to draw the text labels yourself like
ownerdrawn menu buttons?
Where I calculate the width and height of the label and my text size
in the required font and then
draw a rectangle around my text in the centre of the label? Any
examples?
Any suggestion most welecome.
Stuie