PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: David Kenny on March 02, 2010, 01:30:16 PM

Title: Programatically changing tabs on the tab control
Post by: David Kenny on March 02, 2010, 01:30:16 PM
I needed to open my settings dialog and activate a particular tab.

This worked to change the tab: (this is in the WM_CREATE of the form that contains the tab control)     FF_TabControl_SetSelectedTab( HWND_SETTINGS_TABCONTROL1, 1 ) 'Show the File Locatations Tab

The tab label changed to tab 1, but the tab client area stayed on tab 0. After much playing around I found I needed to add a line:     FF_TabControl_SetSelectedTab( HWND_SETTINGS_TABCONTROL1, 1 ) 'Show the File Locatations Tab
     ShowWindow(HWND_FILELOCTAB,%True) 


I can provide a demo FF project if needed.

Is there a better way to do this?

David Kenny
Title: Re: Programatically changing tabs on the tab control
Post by: Rolf Brandt on March 02, 2010, 02:14:11 PM
Use this function:

FF_TabControl_SetTabFocus( HWND_SETTINGS_TABCONTROL1, 1 )
Title: Re: Programatically changing tabs on the tab control
Post by: David Kenny on March 02, 2010, 02:41:36 PM
Spot-on Rolf.  I tried that that routine, but I must have had one of the parameters wrong or was calling it in the wrong place.

Thanks!

Best regards,

David Kenny