gettingstarted
[Top] [All Lists]

Re: Help! TextField with MultiLine

To: Getting Started <gettingstarted at lists dot realsoftware dot com>
Subject: Re: Help! TextField with MultiLine
From: "Joseph J. Strout" <joe at realsoftware dot com>
Date: Wed, 23 Feb 2005 21:03:46 -0600
Delivered-to: gettingstarted at lists dot realsoftware dot com
References: <a05111b2ebe42ea83c07c at [10 dot 0 dot 1 dot 3]>
At 6:22 PM -0800 2/23/05, Betsy Raymond wrote:

The Tutorial DOES NOT SPECIFY what to do with regard to the BOTTOM edge of the TextWindow. I am told, however, that "the window should now look as shown in Figure 11 (the TextWindow after resizing)." In order for the window to "now look as shown in Figure 11," the missing instruction would HAVE to be "and align the bottom edge of the TextWindow with the bottom edge of the TextField."

I don't have Figure 11 handy, but if it looks like that, one of the following must be going on:

1. The tutorial is having you make a window that's not resizeable, i.e., without a grow icon. Otherwise, as you found, the grow icon would overdraw the scrollbar, which is bad.

2. Whoever made Figure 11 didn't understand this point and made an improper figure. If the window's going to be resizeable, the EditField needs to stop about 16 pixels from the bottom.

IF I disregard Figure 11 and align the top of the TextWindow resizing handle with the bottom of the TextField in order to make the entire vertical scroll bar visible, then when I run the debugger the window which opens is predominantly white, its right hand side has the "finished" shaded/curved look of a typical Mac application, but its bottom quarter inch consists of the TextWindow's flat grey plus the hard bright blue line used to demarcate the TextField when the TextField is selected in the Window Editor.

No, actually what you're seeing there is the EditField's focus ring. You can (and should, in a case like this) turn that off by unchecking the "FocusRing" property on the EditField in the IDE.

Since this looks pretty bad, I am assuming that it's not what is intended. My guess (hope) is that the window should actually resemble something more like REALbasic's Source Code editing window.

You can make a window like that by checking the ScrollBarHorizontal property; now the field has two scrollbars, with a perfect little space in the corner just right to fit the grow icon.

But then, of course, your EditField no longer wraps -- it's like BBEdit with "Soft Wrap" turned off, or like the REALbasic code editor. Probably not what you want for a general text editor.

I can't help wondering--if I've barely started and it's this difficult to do something so seemingly simple, what's going to happen when I actually try something challenging?

It just so happens that you've stumbled onto something challenging right off the bat. Most things in REALbasic are much easier. In this particular case, we generally make some other use of the space below an EditField at the bottom of a resizeable window, like put a status area there or some such.

Best,
- Joe

--
REAL World 2005 - The REALbasic User Conference
March 23-25, 2005, Austin, Texas
<http://www.realsoftware.com/realworld>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>