• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. How to disable the default double click callback in a tree...

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 143
  • Views 13881
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to disable the default double click callback in a tree table

fatcat1206
fatcat1206 over 9 years ago

Hi all

In a tree table in a form.

There is a kind of default callback for double click on a tree item.

It will expand/collapse such tree item.

I'd like to know how to disable it.

As I assigne an other self defined callback function. And I don't want such tree item to be expanded or  collapsed.

Best Regards

Yi

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Hi Yi,

    I've not come across anyone asking for this before, and I don't believe there is a built-in way. However, I managed to make a somewhat clunky approach which partly worked. I didn't fully explore to make it fully do what you want though.

    The idea is that you define a double click callback yourself and then within that you call something like this:

    hiRegTimer(sprintf(nil "(hiExpandTreeItem '%s nil)" treeItem 1) ; treeItem is the third arg of the double click callback

    This would always cause them to stay expanded. If you wanted to preserve the status quo, then you'd probably need to define an expandCallback to ?expandCallback on the call to hiCreateTreeTable, and have some mechanism to get your double click callback to record that it was just double clicked and then have the expandCallback determine whether it happened just after (yuck), and if so, re-collapse the field.

    Have to use a timer with a delay of 1 because if you use use hiEnqueueCmd it ends up happening too early.

    With all of this messiness, I really wouldn't do this - it's highly likely to break at some point even if you can get it to work. If you really need this, I would suggest you contact customer support and request an enhancement that there's a way of turning off the double click expand/collapse behaviour.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • fatcat1206
    fatcat1206 over 9 years ago

    Hi Andrew

    Thank you for the quick reply.

    It's good to know there is no build-in way to disable the default double click call back.

    I got your ideas and also your concern about it.

    I may only apply the double click callback to a leave (not a sub-tree) of the tree table, it may make the situation easier.

    or I may consider to use right-mouse button to make a popup menu.

    Thank you for your help.

    Best Regards

    Yi

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information