I am a hobby programmer and please take note of this. I only work exclusively with the application generator and insert handwritten code snippets in the Embeds. I now have a problem: I have written a chat program for a mobile screen application. I have added an Event Timer so that the conversation participant always receives the latest message updates that I send, ensuring they always have the most recent messages.
However, I have sorted the list from A to Z so that the last entry is always at the bottom, as is typical with normal messaging apps. But I have no idea what I need to do to ensure that the last record is always displayed in the browse list and that it always shows the last page instead of the first page.
You’ll have to look in the equates.clw file for the exact wording of the end button, but for every timer event, that will select the listbox if its not already got focus and then replicate a user pressing the end key which would take you to the bottom of the list.
Theres other ways it could be done, but without knowing if you are using abc or legacy templates, I cant really comment at this stage.
This thread has a similar problem but with a parent file, but the principles are no different.
This link has a toolbar method, which does similar. You would need to track down the toolbar event thats being posted, and I think the one Lee posted is what would help.
In essence instead of mimicking the user with a presskey, this is using an event which does similar, ie it posts an event:scrollbottom to the windows accept loop. I dont have my computer on so Im going from a rapidly fading memory.
I think the placement of that code (which embed) would matter much much more. I.e. it assumes the Browse object has been completely configured and loaded.
Using POST EVENT:ScrollBottom is asynchronous. It can be done anytime after the OPEN(Window). It will not be processed until after the Accept Loop starts, and after Event:OpenWindow (or Gain Focus). The Browse is configured and loaded by then.