Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Edittable PGUP PGDN etc OI 9.4.4

edited January 13 in OpenInsight
I want to respond to the event of a keystroke in an edittable. In particular I need to respond to the PGDW PGUP HOME END and arrow keys.
I read on the Rev forum these keys are not passed unless you Qualify the WM_PARENTNOTIFY event on the edittable in the CREATE event.
So I add Call Send_Message("TEST.TABLE"," QUALIFY_EVENT", 528, 1) to the CREATE event.
However I never a get a CHAR event or a WINMSG event when pressing these keys.
Is this just not possible?

Comments

  • I saw your post in the WORKS forum and was surprised to see that you were following up on a several years old discussion. I gather this is still important to you.

    I cannot say if this is possible. I simply haven't played with this (and usually I don't need to because we tend to use the SRP EditTable). I'll let you to contact me directly if you are interested in me scheduling time to dive deeper.

    Perhaps this is just a typo when you posted the code in your post, but I see a space between the opening quote and the keyword QUALIFY_EVENT. If that is how your code looks then I would not expect it to work.
  • If I was to use your edittable, we use it pretty much everywhere else, could I then intercept the arrow keys etc?

    BTW the typo was in my post on here it was correct in my code.
  • Jim - I'm not sure if it will do exactly what you want. Are you hoping to intercept those keys in order to create your own behavior or do you simply need to know when those keys were used to navigate the EditTable control? Or are you looking to achieve something else entirely?
  • We have massive datasets which I need to display in an editable, if I populate the entire thing it takes way too long, a lot of the fields have to be calculated. So, we instead have an editable that contains just a portion of the dataset and a separate vertical scrollbar that moves around the entire. We will have a dataset of say 60,000 lines but only display say lines 300-350. Moving up a page on the scrollbar would display lines 250-300. All this works fine except the arrow keys do not allow you to move above or below the first and last row, PGUP does not move up a page etc.
  • So you are implementing a type of lazy loading. Would the PosChanging or PosChanged event serve your needs? You'll note that we provide a Cause argument which tells you the keyboard or mouse activity that cause the event to trigger.
  • So POSCHANGING will fire if the user is at the top of the table and presses the up arrow?
  • edited January 15
    No, it wouldn't. What you could do is have a row at the top and bottom that spans the width of the table and has the text, "Items X-Y". Then listen for PosChanges into those cells. This not only is a good trigger, but a visual indicater to the user that there is more data above and/or below.
  • Probably not. I don't think I understood earlier that as the user navigates down you will remove the rows currently being displayed and load in new rows. Likewise, when the user navigates up you do the same thing. Is this for performance purposes? Our EditTable has typically handled large data much better than the native edittable control so you might consider simplifying your design. If that is not a desired approach, then perhaps the OnKeyNavigateDone event might help.
  • I need to think about this. But yes Don, just creating the array of data to load into the table takes a bunch of time. Calculating the value held in the cells takes time. I did gain a large performance increase by pre-allocating memory ArrayData = Space(500000) and then using [] to populate the array instead of using concatenation to build the array.
  • I personally like Kevin's suggestion. It keeps things working in a way that is similar to what you are already doing while increasing affordance, so your users have a better experience.

    That said, I was not suggesting you front load all of the data. I was suggesting that you might not need to remove rows that are already loaded.
  • Yes, I understand.
  • I kind of like Kevins idea as well. Thanks for the thoughts and time. It is as always appreciated.
Sign In or Register to comment.