Hi all,
Sorry for the bombardment of questions, but I'm re-tooling my application to meet a lot of the best practices I'm seeing here, and as a result, I'm colliding into all kinds of things I've never seen before.
I've been working with a pageframe in one of my forms for a long time. It's the "core" of the application. But I just discovered a surprising behavior, that I find weird, but I also understand sort of WHY it happens, but not sure what the best method of managing it is.
My pageframe has 8 pages in it, and as I moved from one page to another, there some stuff that needs to happen (mostly related to grid setups). The surprise came when I discovered that the INIT of a page doesn't occur when the pageframe is being built... only for "Page 1". So when I click the tab for Page 2, it fires the Activate event, BUT without the INIT of the page ever happening, and there is setup there that I was expecting to have happen. I didn't want to put it in the Activate event, because that fires all the time when anything in the form brings attention back to the tab.
So the question is this: What is the best way to manage this? I thought the INIT was an event that just happened, and I would have expected it to happen automatically when I click on the tab with a sequence of INIT first, then Activate... but that is clearly not what is happening. I'm quite confused by this.
Best Regards,
Scott
MIET, MASHRAE, CDCP, CDCS, CDCE, CTDC, CTIA, ATS
"Everything should be made as simple as possible, and no simpler."
Sorry for the bombardment of questions, but I'm re-tooling my application to meet a lot of the best practices I'm seeing here, and as a result, I'm colliding into all kinds of things I've never seen before.
I've been working with a pageframe in one of my forms for a long time. It's the "core" of the application. But I just discovered a surprising behavior, that I find weird, but I also understand sort of WHY it happens, but not sure what the best method of managing it is.
My pageframe has 8 pages in it, and as I moved from one page to another, there some stuff that needs to happen (mostly related to grid setups). The surprise came when I discovered that the INIT of a page doesn't occur when the pageframe is being built... only for "Page 1". So when I click the tab for Page 2, it fires the Activate event, BUT without the INIT of the page ever happening, and there is setup there that I was expecting to have happen. I didn't want to put it in the Activate event, because that fires all the time when anything in the form brings attention back to the tab.
So the question is this: What is the best way to manage this? I thought the INIT was an event that just happened, and I would have expected it to happen automatically when I click on the tab with a sequence of INIT first, then Activate... but that is clearly not what is happening. I'm quite confused by this.
Best Regards,
Scott
MIET, MASHRAE, CDCP, CDCS, CDCE, CTDC, CTIA, ATS
"Everything should be made as simple as possible, and no simpler."