This is a tough one, I think. I've developed a Main Menu form that includes a Tree Control field object (actually it's a variable) on the left side of the form. The right side of the form contains a conditional object that displays different sets of buttons based on the selection made on the Tree Control field object.
The first problem I had was to get the conditional object to refresh when a selection was made on the Tree Control. Although I could see that the value of the variable had changed when a new selection was made, the OnChange event didn't fire until the Tree Control lost focus. I couldn't find an event that deals with a Tree Control selection being made, but I solved that problem by using the form's OnTimer event to refresh the conditional object. If someone has a better idea, I'd be interested to hear it.
But the other problem that I can't find a solution for is this: When I select a topic from the Tree Control (for instance, "Contractors", then choose a button on the conditional object that takes me to the Contractors form, and then I return to the Main Menu from the Contractors form, I'd like to be able to have the display on the Main Menu be the same as when I left (Contractor selected on the Tree Control and the conditional object displaying the Contractor buttons). I've tried setting the value of the variable for the Tree Control before it receives focus, but I find that anytime the Tree Control receives focus, the variable changes back to the first selection in the list.
I don't know if there's a solution for this, but again if anybody has any bright ideas, I'd really appreciate hearing them. I've attached a stripped version of the app for you to work with. Hopefully, you'll be able to see there what I'm talking about. (The two buttons that work on the Main Menu are the Contractors button under Navigator and the View Contractor List button under Contacts-Contractors. To return to the Main Menu, press the Main Menu button.)
Thanks a lot.
The first problem I had was to get the conditional object to refresh when a selection was made on the Tree Control. Although I could see that the value of the variable had changed when a new selection was made, the OnChange event didn't fire until the Tree Control lost focus. I couldn't find an event that deals with a Tree Control selection being made, but I solved that problem by using the form's OnTimer event to refresh the conditional object. If someone has a better idea, I'd be interested to hear it.
But the other problem that I can't find a solution for is this: When I select a topic from the Tree Control (for instance, "Contractors", then choose a button on the conditional object that takes me to the Contractors form, and then I return to the Main Menu from the Contractors form, I'd like to be able to have the display on the Main Menu be the same as when I left (Contractor selected on the Tree Control and the conditional object displaying the Contractor buttons). I've tried setting the value of the variable for the Tree Control before it receives focus, but I find that anytime the Tree Control receives focus, the variable changes back to the first selection in the list.
I don't know if there's a solution for this, but again if anybody has any bright ideas, I'd really appreciate hearing them. I've attached a stripped version of the app for you to work with. Hopefully, you'll be able to see there what I'm talking about. (The two buttons that work on the Main Menu are the Contractors button under Navigator and the View Contractor List button under Contacts-Contractors. To return to the Main Menu, press the Main Menu button.)
Thanks a lot.
Comment