PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Haakon Birkeland on August 29, 2006, 08:36:16 AM

Title: Tabcontrol info
Post by: Haakon Birkeland on August 29, 2006, 08:36:16 AM
Hi again

My main form has a tab control with 3 tabs.
Tab 1: Entry screen where all the fittings evaluation are done.
Tab 2: Report screen
Tab 3: Data by which all fittings are processed.

What I would like to do is, When the Tab 2 is selected the screen would be filled with the results of Tab1 entries.

Now, what message should I be using to fill the screen when the Tab 2 is selected?

Or should I be using a thread to continuously update the textboxes on Tab 2?

thanx
bert
Title: Tabcontrol info
Post by: Haakon Birkeland on August 30, 2006, 12:09:38 AM
Found the answer
Press click on menu
press click on firefly help
read help text on tabs
and presto question answered it self
:shock:

thanx
bert
Title: Tabcontrol info
Post by: TechSupport on August 30, 2006, 12:24:41 AM
:)

Cool! Happy that you found the answer on your own. I would use the TCN_SELCHANGING message and update your text boxes when the tab is about to change.

Function FRMMAINFORM_TABCONTROL1_TCN_SELCHANGING ( _
                                                ControlIndex  As Long,      _  ' index in Control Array
                                                hWndForm      As Dword,     _  ' handle of Form
                                                hWndControl   As Dword,     _  ' handle of Control
                                                ByVal lpNMHDR As NMHDR Ptr  _  ' pointer to NMHDR
                                                ) As Long

  If FF_TabControl_GetSelectedTab(hWndControl) = 1 Then   ' b/c tabs are zero based
     ' update the text boxes on Tab #2
  End If

End Function
Title: Tabcontrol info
Post by: Haakon Birkeland on August 30, 2006, 01:44:44 AM
Exactly what I did.
Sorry to waste your time. Just had to read the win32.hlp on "TCN_SELCHANGING" and the FF tab functions and it came together.

thanx
again

bert