I am quite new to Navision. I am trying to implement a rich HTML editor in Navision 2015 (starting from this tutorial):
The editor itself is being initiated when opening the page, but the problem is that it doesn’t support the enter key, therefore it doesn’t create new list elements for example.
I have found an article where it was described that a december 2014 update for Navision contains an interface which would allow C/AL code to respond to key events (https://blogs.msdn.microsoft.com/nav/2015/01/28/how-to-control-keyboards-events-in-add-in/).
I have implemented this code in a separate class in a Visual Studio Project, and then compiled a .dll file. I can read the dll file and the method inside it in Navision, but I am not certain how to instantiate the enter key event in C/AL code.
My text editor is a saved in a Text variable. How can I enable it to accept enter key events, and to create new list elements on those events ?
please read the comments on erik hougaard’s posting about that editor. that issue is discussed, also included are some solutions.
Thank you for the reply. I have already checked the comments in there, but none of them actually suggests a possible resolution of the matter. The issue is not only about pressing the enter key, but actually generating the list elements when doing so, and creating proper line breaks.
For example if I write a C# method which listens to a key press event like:
public void OnKeyDownHandler(object sender, System.Windows.Forms.KeyEventArgs e)
if (e.KeyValue == (char)13)
MessageBox.Show(“Enter key pressed”);
MessageBox.Show(“Another key pressed”);
void OnKeyDownHandler(object sender, System.Windows.Forms.KeyEventArgs e);
I cannot see the method reflected in Navision when importing the .dll. Is it possible to use this approach for solving the issue ?