Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Getting started with TAB control

I’ve been browsing your website to start using the SRP Tab Control and am struggling to get started.

Is there any introduction on how to name the OLD controls in OI? I guessed at the TAB and it worked.

Initially, I want to have 3 tabs. Each tab will have a number of standard OI controls but a different background.

Are there any code samples for your controls? I have also been looking through this forum.

Dave

Comments

  • Hi Dave,

    When you ask about "how to name" the controls, are you referring to the ProgID? If so, then all of our ProgIDs are documented in the "info box" that appears on each controls's main wiki page. For instance, here is the SRP Tab controls main wiki page:

    https://wiki.srpcs.com/display/TabControl/SRP+Tab+Control

    Here is what the info box looks like:



    If this is not the question you asked for please let me know.

    As to your goals with the SRP Tab control, I'm not sure I can direct you to any sample code that will help so let's try to work this out here. Did you already find the TabCount property to get your 3 tabs added? From there you would use the TabCaption property to label each tab.

    If I am covering ground you already know then just ignore my answers and let me know exactly what you need and I'll do what I can to direct you properly.
  • Ok, I saw the info box but don't have the Ole background to know what it represented. Now I know.

    I did see a sample I successfully used the TabCount and TabCaption on the form.

    I understand using Tab in O4W but am not familiar with Ole and OI.

    Getting started:
    Do I make a multipage form like I would in standard OI?
    If so I understand that this OLE control would appear on every page.
    How do I catch the event on the tab control that one was chosen? I assume once I know that I would issue a OI PAGE event?

    Dave
  • Dave,

    Yes, multipage form just like in OI. Make the OLE control "All Pages".

    The specific event that the SRP Tab control generates is OnSelChanged. However, this won't trigger unless you properly qualify the event so OpenInsight is listening for it.

    The problem here is that if you are not familiar with OpenInsight and OLE controls on a general level, then some of this will be difficult. I suggest reviewing our white paper on Using OLE in OpenInsight to get a primer. You can probably just scroll almost half-way down until you get to the section labelled Events. Once you have that background it will be much easier to answer specific implementation questions.
  • That article has helped a lot. Now I'm off creating pages with a different bitmap on each page. Thanks
  • Awesome!
  • Hi, I would find a tutorial on how to get basic tabs working really useful.
  • While not a tutorial, I think the following might suffice since they represents a "basic" scenario that you could easily adapt.

    To setup the tabs of the Tab control you can use the CaptionList or TabCaption properties but you must first set the TabCount property. See the sample code in this page:

    CaptionList Property

    You then need to decide if the Height of the tab will be fixed or anchored to the bottom:

    Height Property

    The above along will visually setup a basic tab. The main event you want to capture is SelChanged:

    SelChanged Event
Sign In or Register to comment.