On Dec 1, 2006, at 3:39 PM, bigbird wrote:
Hi,
I need to display text, updated as users move through a list, that
the end user should NOT be able to interact with, in the following
format:
Minimum of 1 line, to a maximum of 15 lines of multiline text - black.
A label - gray: 1 line of text - black.
A label - gray: 1 line of text - black.
A label - gray: 1 line of text - black.
I can almost do it with 7 StaticText controls, but, I can't figure
out a way to allow for the variable number of lines in the first
block as I don't want to leave a 15 line space to accommodate the
largest occurrence. Or I can do it in one StaticText control, but
can't get the gray colors of lines 2, 3 & 4.
Is there another solution before I adopt some compromise?
You can write your text to an offscreen editfield(ie., a nonvisible
editfield) then use StyledTextPrinter to draw the content onto a
canvas for user display. Alternately, you can write code to size and
position your StaticText controls based on content, using TextHeight
and StringWidth on the window's graphics or a Picture's graphics to
determine the requirements.
Best,
Jack
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>