If I add a new record to a database and wish to refresh a Tab Panel to reflect the update what do I need to do.
Thanks Shane
If I add a new record to a database and wish to refresh a Tab Panel to reflect the update what do I need to do.
Thanks Shane
What is the control on the tab panel which shows your DB info? A listbox? Call Listbox1.invalidate and let the LB query the DB and update the info.
Hi Roger, it is a popupmenu, I used to use seperate pages instead of a Tabpanel and I just used to reload the page after the database updated, not sure what to do now.
Best OOP design is that the popupMenu refreshes itself by gathering the DB info it needs. Maybe you also have a method on the tabPanel which you call to refresh the popupmenu data. You’ve left me quite a guessing game here. Would you like to elaborate so that I can stop guessing?
I was using a window with a popupmenu to list players, save new play, update player etc.
When I was using a window with the popupmenu in it and I saved or updated the data I just used to close and reopen the window which I made reloaded the database to refresh the window with the saved or updated player info.
Now I am using a Tabpanel instead of multiple windows I am trying to refresh the tab panel to display the updated data.
Whatever method the window called upon opening, call that method again. For some reason you don’t seem to want to tell me what code you use to refresh your data, so that’s about the best I can offer. Going to bed now.
Thanks Roger, had a typo that was causing the problem.
And if you need a more general way to have something get notified of changes to something else, consider the Observer pattern.
See Examples/Design Patterns/Observer and the Design Patterns webinar.