Forum Discussion
Depends what kind of control they're using to manage their tabs?
In my Delphi app, they use a "TPageControl" object. This has an "FTabs" property. Which contains the list of tabs within the control container with new line separators.
So I have to extract these into an array. Find the one that matches the text I want. And then set the "ActivePageIndex" property of the control container to the index number of the matching tab. I think there is a method that allows you to set the active tab by name (SetActivePage or ChangeActivePage). But, as all my stuff is user data driven, I prefer to validate first which is why I do it the way I do. It makes sure a valid tab has been specified before it tries to switch to it.
You could use a direct method, but I would want error trap[ping round it in case a bad tab name is specified.
But this may be completely different for you. Depending on the tab controller in use.
Colin_McCrae in my app there is no " TPageControl " object.
Related Content
- 12 months agolalit_singh
- 2 years agomitov
- 2 months agochris90mn