Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 80545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T21:19:10+00:00 2026-05-10T21:19:10+00:00

I’m having trouble with the Dojo documentation (as usual). On their TabContainer API ,

  • 0

I’m having trouble with the Dojo documentation (as usual).
On their TabContainer API, they list the second argument as an object called ‘params’, but they never say what you can actually put in this params object. Can I specify the width? The height? Do I specify the id’s of the divs I want to be the tabs inside the container?

There’s also no specification of what attributes I would put in HTML if I wanted to specify the tab containers to be parsed by the Dojo parser. I found the following example that lets you put the title, selected and closable options. Is there anything else?

<div id='tabA1' dojoType='dijit.layout.ContentPane' title='First Tab'  selected='true' closable='true'>         First Tab     </div>     <div id='tabA2' dojoType='dijit.layout.ContentPane' title='Second Tab' closable='true'>         Second Tab     </div>     <div id='tabA3' dojoType='dijit.layout.ContentPane' title='Third Tab' closable='true'>         Third Tab     </div> </div> 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T21:19:11+00:00Added an answer on May 10, 2026 at 9:19 pm

    I am not an expert in Dojo widgets, but this is what I know:

    1. All Dojo widget constructors have signature:

      var widget = new Widget(params, node);

    2. The best way to discover params is to look at the source code — don’t get scared, they would be documented variables at the beginning of a relevant class.

    3. The relevant file is usually simple to find using the name of the widget because they are named by their path.

    4. The best way to look up this stuff is to use a Dojo checkout with your favorite text editor. But the nightly checkout works too (if you follow the trunk). Or the Trac source browser.

    5. Don’t underestimate the power of looking at tests and demos.

    Example: dijit.layout.TabContainer ⇒ dijit/layout/TabContainer.js. If the file is missing look into directories of the hierarchy for _base.js, or some similarly sounding files — the latter can bundle related classes together. But in most cases (like with TabContainer) you’ll find it immediately. Let’s go and look.

    There are two public documented parameters in the top of the class:

    • tabPosition — String. Defines where tabs go relative to tab content. ‘top’, ‘bottom’, ‘left-h’, ‘right-h’. Default: ‘top’.
    • tabStrip — bool. Defines whether the tablist gets an extra class for layouting. Default: false.
    • _controllerWidget — just ignore it, no public parameters start with the underscore — it is a common JavaScript convention to designate protected members.

    But it is not all. TabContainer is based on dijit.layout.StackContainer (just look at the dojo.declare() header). We can use StackContainer’s public parameters as well:

    • doLayout — Boolean. If true, change the size of my currently displayed child to match my size. Default: true.
    • persist — Boolean. Remembers the selected child across sessions. Default: false.

    As you can see the code and parametrs are nicely documented, yet not always reflected in the API tool. Now we can create the tab container with confidence.

    But let’s see it in action first. All Dijit tests are always in dijit/tests. Any dijit.layout.* widget will be tested in dijit/tests/layout. The relevant test file would be named something like test_TabContainer.html, and in fact I see 5 files for that:

    • test_TabContainer.html.
    • test_TabContainer_noLayout.html.
    • test_TabContainer_prog.html.
    • test_TabContainer_remote.html.
    • test_TabContainerTitlePane.html.

    For example, let’s recreate the first TabContainer of test_TabContainer.html:

    var tc = new dijit.layout.TabContainer(   {persist: true, tabStrip: true}, 'mainTabContainer'); 

    Or we can do it like in the test inline:

    <div id='mainTabContainer' dojoType='dijit.layout.TabContainer'     persist='true' tabStrip='true' style='width: 100%; height: 20em;'>   ... </div> 

    Coming back to your original question: now you can see that width and height are specified simply as styles, no special attributes, nothing fancy, just some intuitive CSS. So if you want to do it programmatically, just set them on a node before creating a new instance of TabContainer.

    Yeah, I wish the API doc got all these small details too, but the whole setup is intuitive, and relevant parts are documented right in the file. We did go to the source code, but we didn’t try to decipher the source code, just read human-readable comments on the top of the class.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 207k
  • Answers 207k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Like Dan stated, this is normal behavior. To make it… May 12, 2026 at 9:19 pm
  • Editorial Team
    Editorial Team added an answer Don't use AutoMapper for this - it's not worth it.… May 12, 2026 at 9:19 pm
  • Editorial Team
    Editorial Team added an answer The doctype needs to be strict for line-height to work… May 12, 2026 at 9:19 pm

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
In order to apply a triggered animation to all ToolTip s in my app,
I have a French site that I want to parse, but am running into
I have text I am displaying in SIlverlight that is coming from a CMS

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.