Update component on window focus

Hi all,

Another newbie question. I am hoping the answer will basically apply to all (most/some) components.

I have a drop down that is bound a select query (not a named query). I want the query to update each time the window comes into focus.

Is there a function that I can run in the event handler to update a component.


Dropdown is on main window.
Open a popup that adds to the database table the dropdown looks at.
when I close the popup (bring main window in focus) the new data is not in the dropdown.

If I close the main window and reopen, it is fine.

Thanks, Steven

Have a look at the Windows Scripting event handlers (and in your case the internalFrameActivated event).

@code_skin, that is what I want to do, but what function updates the component?

It would be something like

component = rootContainer.getComponent('Dropdown')
system.db.refresh(component, 'data')


That’s what I was looking for. I wasn’t expecting it to be in the system.db functions.

Thanks so much!!


1 Like