Drop down menu or button in hyperview

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

Hello

 

So I want to create a drop down menu or button in hyperview

 

So which commands should I use

 

Thank you 

Answers

  • Q.Nguyen-Dai
    Q.Nguyen-Dai Altair Community Member
    edited December 2016

    The best thing for you is MVP_Toolbar :

    ftp://ftp.altair.de/pub/hyperworks/support/macro_toolbars/

     

     

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited December 2016

    hello

     

    correct me if I am wrong

    but on that website hypermesh toolbar only available right, I want it in hyperview

  • Q.Nguyen-Dai
    Q.Nguyen-Dai Altair Community Member
    edited December 2016

    It's toolbar for Hyperview!!!

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited December 2016

    I gone trough that pdf

    correct me if I am wrong I guess it is different tool bar and different customization

     

    I want to add only my script to drop down list or button nothing else using tcl script like it is available in hypermesh

     

    so can you tell me name of command that will do that?

     

     

     

     

  • tinh
    tinh Altair Community Member
    edited December 2016

    Hi

    to create menu items

    [. cget -menu] add command -label demo -command 'puts demo'

     

    refer to tk command 'menu'

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited December 2016

    I looked into it but didn't understand much in first go

     

    Still working on it

     

    Meanwhile please do share if you have any example in which a menu created in hyperview

     

    And where do I need to paste this command so that it will execute it as menu??

  • tinh
    tinh Altair Community Member
    edited December 2016

    please learn to create menu in tk . there are many examples you can find online

     

    after you have a menu, add it to hyerview easily by

    [. cget -menu] add cascade -label Menu -menu $yourmenu

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited October 2018

    please learn to create menu in tk . there are many examples you can find online

     

    after you have a menu, add it to hyerview easily by

    [. cget -menu] add cascade -label Menu -menu $yourmenu

    i have created a menubutton in tk ,how to add this menu to hyperview window? to modifie which file? thanks

     

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited October 2018

    i have created a menubutton in tk ,but how to add this menubutton to hyperview window? to modifie a hyperview file? thanks

     

    @tinh 

  • tinh
    tinh Altair Community Member
    edited October 2018

    Menubutton differs from menu

    What are you creating?

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited October 2018

    likes a toolbar 

    i create it with hwtk::menubutton

     

    @tinh 

  • tinh
    tinh Altair Community Member
    edited October 2018

    Ok it is a menubutton

    It cannot be placed in a menu

    Where do you want to place it?

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited October 2018

    2026364149_TIM20181018162027.png.061966a6d1771ecbfebb816f5bbf5505.png 

     

    This is what i want to creat and place it here

    @tinh 

    <?xml version="1.0" encoding="UTF-8"?>TIM截图20181018162314.png

  • tinh
    tinh Altair Community Member
    edited October 2018

    I have a base script to make toolbar and toolbar button

    But for hypermesh

    I will test it on hyperview if possible

    Plz wait...

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited October 2018

    Ok

    thanks

  • tinh
    tinh Altair Community Member
    edited October 2018

    Hi, 

    It is not available for hyperview

    But i found a proc to create toolbars in HV

    ::hwt::HwToolbar

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited October 2018

    Ok,do this proc need to be added to a hyperview default file ?

  • tinh
    tinh Altair Community Member
    edited October 2018

    Yes

    It is a base proc

    So you have to use it to make tcl codes creating toolbars other than just type it in default file

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited October 2018

    ok, do you konw which file should be modified.

    or how can find the default file 

  • tinh
    tinh Altair Community Member
    edited October 2018

    Create your own tcl file

    And modify target of hv shortcut with adding -tcl 'your tcl file'

    If you cannot create toolbar, add your menu onto main hv dropdown menu

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited October 2018

    ok thanks