Tab Strip - OCX

wbenhart

New Member
I need some help using OCX tab strip in a progress window. I have never used OCX before and would like to know where to find the object names to use with it. I am using Microsoft TabStrip Control, Version 6.0

does anyone have examples on how to change tabs and add objects to each tab?

Any help would be helpful.

Thanks,

Wayne Benhart
 

BONO

Member
I've never use tabstrip ocx so if u want more information about method, attribute .., I think u have to launch the com object viewer (protools utility(graphical) on the appbuilder). search the ocx file associated with tabstrip and then find info about the use.

hope it's help
 

wbenhart

New Member
Ok that helped... Thank you.

Next... How do I snap objects each tab of the OCX where if I click on the first tab it sees one set of objects and the next tab sees a different set of objects? Should I use frames to hide and view when the ocx returns which tab it's on or is there a better method?

Does anyone have a simple example with using tabstrip's (MSCOMCTL.OCX)?

Thank you,

Wayne Benhart
 

jongpau

Member
Yep, I think separate frames for each tab are the way to go. It's easiest to hide and view entire fieldsets (and whatever else you use in your tab pages) that way. If anyone has a better way I would love to see it!

You could, for instance, set the handle of the frame of each tab you use in the "Tag" property of the individual tab. Then in the click event of the TabStrip you "immediately" know the handle of the frame and can hide the currently viewed one and view the frame of the tab that has been clicked.

A bit of "dry typing" because I do not have Progress open at the moment so you may have to tinker with it a little:
Code:
     DEF VAR lhCurrentFrame AS HANDLE NO-UNDO.
     ..
     ..
     <All the other code>
     ..
     ..
     PROCEDURE TabStrip.TabStrip.Click:
       DEF VAR lhTab AS HANDLE NO-UNDO.
     
       lhTab = WIDGET-HANDLE(chTabStrip:SelectedItem:Tag) NO-ERROR.
       IF NOT VALID-HANDLE(lhTab)
       THEN RETURN.
      
       IF VALID-HANDLE(lhCurrentFrame)
       THEN lhCurrentFrame:VISIBLE = FALSE.
       ASSIGN lhTab:VISIBLE  = TRUE
   	    lhCurrentFrame = lhTab.
    
        <do whatever else you want to do on click of the tab>
     END PROCEDURE.
 
Top