Programatically changing tabs on the tab control

Started by David Kenny, March 02, 2010, 01:30:16 PM

Previous topic - Next topic

David Kenny

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

Rolf Brandt

Use this function:

FF_TabControl_SetTabFocus( HWND_SETTINGS_TABCONTROL1, 1 )
Rolf Brandt
http://www.rbsoft.eu
http://www.taxifreeware.com
I cook with wine, sometimes I even add it to the food.
(W. C. Fields)

David Kenny

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