Determine Tab Containing a Control |
Post Reply |
Author | |
jgordon428
Groupie Joined: 11 June 2009 Status: Offline Points: 21 |
Post Options
Thanks(0)
Posted: 07 August 2009 at 1:53pm |
I have a spell checker routine that will scan through all the textboxes in a form, and when it finds a misspelling, it will display the spelling correction dialogue. I have a form that uses the XtremeSuite TabControl. What I would like to do, is when I find a textbox with a misspelled word, to set the current tab to the control's tab, so the user can see the tab page that contains the control in question. With previous tab controls I've used, there was a GetTab(hWnd as long) function, where you could pass it the handle to a control, and it would return the relevant tab number. I don't believe there is an equivalent function with these controls, so I was hoping for a bit of help.
Is it possible to add in this functionality? Is there a different way I could go about doing this, for instance iterating through a collection of controls within each tab or tabControlPage? I would prefer not to use a hack like storing the tab index in each textbox tag property if at all possible. Thank you. |
|
daniel_r
Groupie Joined: 06 October 2009 Location: Germany Status: Offline Points: 14 |
Post Options
Thanks(0)
|
You have to walk all the parents/containers of that control until you find a TabControlPage.
I did the same just yesterday for VB6:
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |