On 21-Jan-06, at 12:52 AM, Terry Ford wrote:
Just woke up. <Yawn!>
To duplicate "&cFFFFFF":
Dim v as Variant
v = Filestream.ReadLine
BevelButton1.Caption = "&&c" +right( v,6)
I finally woke up and realized how silly this answer was.
I also realized that I really don't understand the question. What are
you trying to do?
The first example I gave shows how a variant can be a simple way to
convert a color to a string to be written in a TextOutputStream and
convert it from a string (ReadLine) to a color to set an editfield's
backcolor.
To display the string from ReadLine as the caption for the
BevelButton does *not* require a variant.
By using a variant to convert the WriteLine to a TextOutputStream,
its text is "hFFFFFF". To read this string as the caption for the
BevelButton as "&cFFFFFF", all that is required is:
BevelButton.Caption = "&&c" + Right(Filestream.ReadLine,6). Two
ampersands are required to display one ampersand and the Right
function simply eliminates the "h" from the string.
I'm sure you can figure out something from all of this confused mumbo-
jumbo as I am still in the dark about your actual situation.
Terry
On 20-Jan-06, at 9:51 PM, Lennox Jacob wrote:
Hello,
I have an edit field with a backColor, say for example &cFFFFFF -
white,
How do I get TextInputStream to read in a BackColor like
EditField1.text = Filestream.ReadLine for text
BevelButton1.caption = Filestream.ReadLine for BevelButton Caption
I tried
"&c" + Right(Cstr(EditField1.BackColor),6) = Filestream.ReadLine
but get a syntax error
Why not use a variant?
Dim v as Variant
//To write:
v = EditField1.BackColor
Filestream.WriteLine v
//To read:
v = Filestream.ReadLine
EditField1.BackColor = v
Works for Boolean conversions as well.
_______________________________________________
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>