Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Off Window Text Area (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: Listbox Drop Object
Next thread: SelectColor Function


Getting ListBox Cell Left and Top   -   Rubber Chicken Software Co.
  Off Window Text Area   -   Louis G5 Batayte
   Re: Off Window Text Area   -   Tim Jones
   Re: Off Window Text Area   -   Steve Garman
    Re: Off Window Text Area   -   Steve Garman
     Re: Off Window Text Area   -   Steve Garman
      Re: Off Window Text Area   -   Louis G5 Batayte

Off Window Text Area
Date: 09.08.09 05:57 (Sun, 9 Aug 2009 00:57:14 -0400)
From: Louis G5 Batayte
I needed access to a block of text for some header information. The
block contains double quotes, so it is difficult to just paste in as a
string. I didn't want to open a file to read it in, then I thought
about pasting it into a textarea that is off the window, out in the
edit area background. This works really well, just suck it into a
string with testarea.text. Does anyone know why this may not be a
good thing to do? Can having an off window control hanging around
cause any problems?

thanks
Lou

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Off Window Text Area
Date: 09.08.09 22:00 (Sun, 9 Aug 2009 14:00:45 -0700)
From: Tim Jones
On Aug 8, 2009, at 9:57 PM, Louis G5 Batayte wrote:

> I needed access to a block of text for some header information. The
> block contains double quotes, so it is difficult to just paste in
> as a string. I didn't want to open a file to read it in, then I
> thought about pasting it into a textarea that is off the window,
> out in the edit area background. This works really well, just suck
> it into a string with testarea.text. Does anyone know why this may
> not be a good thing to do? Can having an off window control hanging
> around cause any problems?

I use this method for preparing output for printing. Have not had
any issues in 5 years. The only thing I noticed was that on Linux,
the window opens to include the off-window control and then resizes.
I fixed that by making sure that the TextField was set to invisible.

HTH,
TIm

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Off Window Text Area
Date: 09.08.09 08:13 (Sun, 9 Aug 2009 08:13:08 +0100)
From: Steve Garman
> string with testarea.text. Does anyone know why this may not be a
> good thing to do? Can having an off window control hanging around
> cause any problems?

It should cause no problems.

You might want to set Visible to false in case some clever piece of
window-resizing combines with some weird overlapping multi-screen setup to
pull your textarea into view.

Having said that, the normal way to deal with this sort of issue is to
create a text file containing the header text and drag it into your project.

You then have a nice simple variable created automatically to contain the
text without the overhead of a control.

Re: Off Window Text Area
Date: 09.08.09 08:38 (Sun, 9 Aug 2009 08:38:47 +0100)
From: Steve Garman
Alternatively of course you could write a little helper app to generate the
code for you.

A simple app with a textarea and a pushbutton containing
dim s As string
dim newline As String = """ + EndOfLine + _" + EndOfLine + """"
s = ReplaceAll( TextArea1.Text, """", """""" )
s = ReplaceLineEndings( s,newline )
s = "myvar = " + """" + s + """"
dim clp as new Clipboard
clp.SetText s
clp.Close

Then just paste your header into the textarea and press the button.

This could be done more cleanly with an IDEScript if you have access to
them.

Re: Off Window Text Area
Date: 09.08.09 08:48 (Sun, 9 Aug 2009 08:48:57 +0100)
From: Steve Garman
But by far the easiest thing to do is to add a constant to the window and
put your header text in there.

Re: Off Window Text Area
Date: 09.08.09 15:26 (Sun, 9 Aug 2009 10:26:01 -0400)
From: Louis G5 Batayte
Thank You Steve,
It never occurred to me to put the text in a constant. Just what I
need to do.
I will spend some time looking at your other two suggestions

Thanks again
Lou

On Aug 9, 2009, at 3:48 AM, Steve Garman wrote:

> But by far the easiest thing to do is to add a constant to the
> window and
> put your header text in there.
>
> --
> Steve Garman
>
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>