Effecting Seperate Colours on Different Lines in same Text Object (OpenInsight Specific)
At 15 SEP 2001 04:03:09AM d schranz wrote:
I have 1 Text Label with several lines of text (Due to memory issues in Window - Max. No. of Objects Reached)
I need to effect different colours to different lines in this Label Object.
Is this possible.
If not I will be forced to create different labels, that will exceed the max no. of objects available in the window.
Thanks
David Schranz
At 15 SEP 2001 03:38PM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:
A bit overkill but you could embed an edit table and use color_by_pos to change the line colours. Remove the row numbers, the headings etc. This way you still only use one control.
World Leaders in all things RevSoft
At 16 SEP 2001 12:33AM Donald Bakke wrote:
David,
In addition to using a single static text control to simulate multiple lables we have created a single BMP. With the BMP you could color the text as you see fit. The obvious downside of this approach, however, would occur when the end user changed their desktop color scheme and the rest of your window took on a different color than the one you used for the BMP. You could lock these colors down as well.
Another approach, but one that may potentially be against a runtime license (although I'm not sure with 3.75 now) is dynamically creating your text labels within the CREATE event. Only the Form Designer enforces a 115 control limit. It's a relatively simple process: create the text labels originally in the Form Designer, put code in the CREATE event to retrieve the ORIG_STRUCT property of these labels, write this data to a temporary location, remove the controls, and then put a Utility("CREATE") statement in the CREATE event for each label and pass it the structure information you collected before.
Now having brought up this posibility, you should know that even if you programmatically increase the number of controls on a form you still reduce the amount of resources available to Win9x operating systems. WinNT/2000 do not seem to be affected by this as far as we've been able to tell.
At 17 SEP 2001 05:12AM Oystein Reigem wrote:
David,
I assume it's different background colours you want. But just in case you're satisfied with different foreground colours (i.e, the colours of the characters themselves), and you promise to be good and not try and display 8-bit characters you can use an RTF edit box.
- Oystein -