add sample file for custom menu additions
This commit is contained in:
parent
229241c4a4
commit
63f266c905
|
|
@ -12,7 +12,7 @@ put /local/src {
|
|||
put /local/install_shares {
|
||||
keys.help xschem.help xschem.tcl break.awk convert_to_verilog2001.awk
|
||||
flatten.awk flatten_tedax.awk flatten_savenodes.awk make_sym.awk symgen.awk order_labels.awk
|
||||
sort_labels.awk spice.awk tedax.awk verilog.awk vhdl.awk hspice_backannotate.tcl
|
||||
sort_labels.awk spice.awk tedax.awk verilog.awk vhdl.awk hspice_backannotate.tcl add_custom_menu.tcl
|
||||
change_index.tcl resources.tcl xschemrc ngspice_backannotate.tcl rawtovcd gschemtoxschem.awk
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
## Add a custom menu in xschem
|
||||
|
||||
## Create a menu entry 'Test'. '.menubar' is xschem's main menu frame.
|
||||
menubutton .menubar.test -text "Test" -menu .menubar.test.menu -padx 3 -pady 0
|
||||
menu .menubar.test.menu -tearoff 0
|
||||
|
||||
## Create a couple of entries
|
||||
.menubar.test.menu add command -label "Test entry 1" -command {
|
||||
puts Hello
|
||||
}
|
||||
.menubar.test.menu add command -label "Test entry 2" -command {
|
||||
puts World
|
||||
}
|
||||
|
||||
## make the menu appear in xschem window
|
||||
pack .menubar.test -side left
|
||||
|
||||
Loading…
Reference in New Issue