Board index » off-topic » Re: My QC - Dialogs and keyboards!
Kjell Rilbe
Delphi Developer |
Re: My QC - Dialogs and keyboards!2005-04-22 09:53:38 PM off-topic8 Craig Stuntz [TeamB] wrote: QuoteKjell Rilbe wrote: - 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 --------------------------------------------------------------------------- |