?
Solved

Enter Key

Posted on 2005-04-19
3
Medium Priority
?
636 Views
Last Modified: 2013-12-26
Hi All,

I need to provide enter key facility within the multi line edit control to go to the next line.
Currently i have to press CTRL + Enter key to go to the next line.

Is this possible? (only enter key to go to next line)

Thanks in advance
Srinib
0
Comment
Question by:srinib
3 Comments
 

Expert Comment

by:kumaraykkara
ID: 13821908
In your MultiLine Datawindow. Just maintain 2 Instance Variables for is_FirstCol, is_LastCol.
Assign the Column Names in the Open Event of the Window.

Create User Event called ue_enter using the "pbm_dwnprocessenter"

The Following Script will take to Next Column, just like Tab.

Send(Handle(this), 256, Long(9, 0), Long(0, 0))
RETURN 1

Long      ll_row
//
IF This.GetColumnName( ) = is_LastCol THEN
      // When User is in the Last Row of the Datawindow, This will Trigger the AddRow Event of the DataWindow
      IF This.GetRow( )      = This.RowCount( ) THEN
        ll_row = This.Event AddRow()
        This.ScrollToRow( ll_row )
        This.SetColumn( is_FirstCol )
        This.Object.DataWindow.HorizontalScrollPosition = 0
     ELSE //Otherwise, it will take to next row
        This.ScrollToRow( This.GetRow() + 1 )
        This.SetColumn( is_FirstCol )
        This.Object.DataWindow.HorizontalScrollPosition = 0
    END IF
ELSE // If the Column is not the Last One, it will take to Next Column
      Send(Handle(this), 256, Long(9, 0), Long(0, 0))
END IF
//
RETURN 1
0
 
LVL 1

Author Comment

by:srinib
ID: 13822921
I am Sorry kumaraykkara, my requirement is not to provide enter key functionality between DW columns.

My requirement is that, i have a multi line edit control in a window. When entering some text in that control, currently i need to press CTRL+Enter key to go to the next line. But i want to have only enter key to go to next line within multi line edit control.

Hope you understood my case.

Thanks
Srinib
0
 
LVL 1

Accepted Solution

by:
Codezilla earned 120 total points
ID: 14243389
You need to set the IgnoreDefaultButton property of the MLE to True. When set to True a new line will be added to the MLE when the Enter key is pressed.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question