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 8174411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T22:27:06+00:00 2026-06-06T22:27:06+00:00

I have a tree in which i want the onOpen and onClose to be

  • 0

I have a tree in which i want the onOpen and onClose to be called only when the user clicks on the +/- icon and not if he clicks anywhere on the line that contains the folder. then I want the onClick event fired whenever the user clicks on the line where the folder is(except for on the expand/collapse icon). I have tried looking at the node passed to the onopen by default and also have tried looking at the node sent by the onclick. It seems that onopen ovverides onclick internally. Please give me a direction to approach this issue.

Thanks in Advance!

  • 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. Editorial Team
    Editorial Team
    2026-06-06T22:27:07+00:00Added an answer on June 6, 2026 at 10:27 pm

    Looks like there is a flag you can pass to the Tree to do this:

    // openOnClick: Boolean
    // If true, clicking a folder node's label will open it, rather than calling onClick()
    openOnClick: false,
    

    You would use it like this:

    var myTree = new Tree({
        ..., //the other arguments you are already using
        openOnClick: true
    });
    

    In the future, I recommend checking the API docs or the source code for the widgets you are using. You will find that you will often stumble across useful features like this and that the Dojo source code is well organized and easy to read so its a good place to check whenever you have a doubt about how something works.

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

Sidebar

Related Questions

I have a tree with DefaultMutableTreeNodes only. I want to write a TreeCellRenderer that
I have a Tree, which is populated with TreeItems that may have an image
I have SWT tree which has child. Now I want to provide a right
Hey guys, I have created a tree which is not a binary tree. Now,
I have a tree and I want to I have a table which has
I currently have this line of code which I want to work in all
I have a table that contains another table which I want to remove with
I want to have a tree expanded only when it is required. eg: OS
Dear Masters of The Command Line, I have a directory tree for which I
The context is that I have an on off-the-shelf CMS which I want to

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.