Discussion:
How to set the line height of a LTEXT control?
(too old to reply)
Colin Finck
2006-11-15 19:51:00 UTC
Permalink
Hello,

At the moment I use 5 LTEXT controls to display 5 lines of text. The
LTEXT controls are arranged horizontally the way, so it looks like they
have a different line height than normal controls.
But with this method, the text won't be wrapped automatically if it
does not fit into a line.

Now I look for a way to set the line height of a LTEXT control, so that
I don't need several controls. Is this possible?

Alternatively, is it possible to wrap the text into another LTEXT
control if it does not fit into a line?

Many thanks in advance,

Colin Finck
David Lowndes
2006-11-16 00:38:07 UTC
Permalink
Post by Colin Finck
At the moment I use 5 LTEXT controls to display 5 lines of text. The
LTEXT controls are arranged horizontally the way, so it looks like they
have a different line height than normal controls.
But with this method, the text won't be wrapped automatically if it
does not fit into a line.
Colin,

The documentation says:

"The LTEXT resource-definition statement creates a left-aligned text
control. The control is a simple rectangle displaying the given text
left-aligned in the rectangle. The text is formatted before it is
displayed. Words that would extend past the end of a line are
automatically wrapped to the beginning of the next line. Words that
are longer than the width of the control are truncated.
"

... so why don't you just change the height parameter for that
resource statement so that it can display 5 lines?

Dave
Colin Finck
2006-11-16 14:49:05 UTC
Permalink
My problem is that I want to change the height of a line and not only
of the control.

For example look at the "System Properties" dialog of Windows (Start ->
Right-click on "My Computer" -> Properties).
There in the "General" tab, you see some lines about your system. These
lines do not have the usual line height.

Best regards,

Colin Finck
David Lowndes
2006-11-16 15:47:26 UTC
Permalink
Post by Colin Finck
For example look at the "System Properties" dialog of Windows (Start ->
Right-click on "My Computer" -> Properties).
There in the "General" tab, you see some lines about your system. These
lines do not have the usual line height.
If you examine that dialog page with Spy++ you'll see that they're
individual static controls, the "line height" you're referring to
there is just the placement of the controls on the dialog page.

To do something similar in a single window I think you'd have to write
your own custom control - probably not worth the effort!

Dave

Loading...