Board index » off-topic » Re: My QC - Dialogs and keyboards!

Re: My QC - Dialogs and keyboards!


2005-04-22 09:53:38 PM
off-topic8
Craig Stuntz [TeamB] wrote:
Quote
Kjell Rilbe wrote:


>>>Don't agree. All applications I've come across to date have had
>>>Enter = accept dialog and Ctrl+Enter = insert line break in memo.
>>
>>Outlook certainly doesn't behave this way. Just the opposite.
>
>I'd say Outlook is the exception then.

I don't think so. XanaNews behaves like Outlook, for example. Outlook
Express (despite the name, a totally different app than Outlook)
behaves the same way. Having to press Ctrl+Enter to put a CR/LF in a
memo control is certainly not the normal behavior of the Windows
control.
I don't know if TMemo changes the default behavior of the underlying
Windows control but try this:
- Put two TMemos and TButton on a form
- Set one TMemo's WantReturns to True
- Set the other TMemo's WantReturns to False
- Set the TButton's Default to True
- Let the TButton's OnClick show a MessageDlg
- Run
Now, in the WantReturns=True TMemo if you hit enter you get a linebreak
and no MessageDlg. In other words, the TMemo "steals" the Enter. This is
something I personally hate, because in a dialog you always want the
default to work, i.e. Enter = accept dialog.
In the WantReturns=False TMemo if you hit enter you don't get a
linebreak but you do get a MessageDlg. This is the way I like it.
In *both* TMemo's you can hit Ctrl+Enter to get a linebreak (and no
MessageDlg).
Apparently in Outlook etc they've tied some other function to Ctrl+Enter
that overrides the *default* TMemo behavior to insert a linebreak.
So, in StarTeam Enter should accept the dialog, even if a memo has
focus. Anyone who wants a linebreak in the memo can do that using
Ctrl+Enter, which, as far as I can determine, is the *default* behavior
of the memo control.
Kjell
--
---------------------------------------------------------------------------
Kjell Rilbe
Home: +46 8 7610734
Cell: +46 733 442464
---------------------------------------------------------------------------
"If there's a price for bein' me, that's one I'll have to pay"
Aaron Tippin
---------------------------------------------------------------------------
 
 

Re:Re: My QC - Dialogs and keyboards!

Kjell Rilbe wrote:
Quote
Now, in the WantReturns=True TMemo if you hit enter you get a
linebreak and no MessageDlg. In other words, the TMemo "steals" the
Enter. This is something I personally hate, because in a dialog you
always want the default to work, i.e. Enter = accept dialog.
Except if you're typing text with paragraphs, in which case it's
incredibly inconvenient. The "enter" or "return" key, which predates
the computer, has the default function of a CR/LF, but is occasionally
adapted to do other things. In this way it is analogous to the space
bar, which has the default function of entering a space, but is adapted
-- only in situations where you can't enter a space, mind you -- to do
other things such as page down or press the default button on a form.
At any rate, you're entitled to your opinion and I'm entitled to mine,
and I don't think we're convincing each other, so I'm going to drop it.
--
Craig Stuntz [TeamB] . Vertex Systems Corp. . Columbus, OH
Delphi/InterBase Weblog : blogs.teamb.com/craigstuntz
IB 6 versions prior to 6.0.1.6 are pre-release and may corrupt
your DBs! Open Edition users, get 6.0.1.6 from mers.com
 

Re:Re: My QC - Dialogs and keyboards!

Craig Stuntz [TeamB] wrote:
Quote
At any rate, you're entitled to your opinion and I'm entitled to mine,
and I don't think we're convincing each other, so I'm going to drop it.
Sure. I just wanted to point out that as far as I can determine you
didn't have your facts straight when you said that Ctrl+Enter for
linebreaks in memos is non-default behavior.
I can also mention that in forms that are not dialogs I have no
objections whatsoever to setting TMemo.WantReturns=True.
Kjell
--
---------------------------------------------------------------------------
Kjell Rilbe
Home: +46 8 7610734
Cell: +46 733 442464
---------------------------------------------------------------------------
"If there's a price for bein' me, that's one I'll have to pay"
Aaron Tippin
---------------------------------------------------------------------------
 

{smallsort}

Re:Re: My QC - Dialogs and keyboards!

Checkin, you are in comments. Ctrl-Enter does not work, it just acts like
enter in the memo field. ;(
Blog: blogs.atozed.com/kudzu