HOWTO: Displaying Graphic on Each Tab of SSTab at Runtime

Last reviewed: April 2, 1997
Article ID: Q166139
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, versions 5.0, 5.0a

SUMMARY

This article explains how you can display a graphic on each tab of a SSTab ActiveX control at run time.

MORE INFORMATION

The SSTab control is an ActiveX control that ships with Visual FoxPro 5.x. The SSTab control provides a group of tabs, each of which acts as a container for other controls.

The steps below demonstrate how to create an example of one of these controls:

  1. Create a form.

  2. Add the SSTab ActiveX control to the form. By default, SSTab always has three pages.

  3. Change the name of the control from Olecontrol1 to SStab1.

  4. Add a Command button to the form and change the Caption property to "Set Picture."

  5. In the Click method of the Command button, put in the following code:

          FOR cPage = 0 to 2
    
               THISFORM.SSTab1.Object.Tab = cPage   &&select the current page
               THISFORM.SSTab1.Object.Picture = ;
                   LoadPicture(home()+"samples\graphics\bmps\outline\leaf.bmp")
          ENDFOR
          THISFORM.SSTab1.Object.Tab = 0
    
    

  6. Save and run the form.

When the form is running, click on the Command button to display the graphic on each tab.

Note: Remember, the tab in SSTab ActiveX control always begins with 0.

The Picture property of the SSTab control requires an object reference, and the LoadPicture function returns an object reference to the graphic file.

The LoadPicture function supports the bitmap (.bmp), icon (.ico), or Windows metafile (.wmf) graphical formats.


Keywords : FxotherGraphic kbgraphic vfoxwin
Version : 5.0 5.0a
Platform : WINDOWS
Issue type : kbhowto


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 2, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.