Menu

Tree [970f64] default tip /
 History

Read Only access


File Date Author Commit
 i 2019-09-11 Brad Lanam Brad Lanam [c0f06e] ex4
 .hgignore 2020-10-21 Brad Lanam Brad Lanam [7e56fb] version 1.47
 .hgtags 2020-12-15 Brad Lanam Brad Lanam [33e556] Added tag 1.51 for changeset 8fea6e35ffa7
 README.txt 2020-10-21 Brad Lanam Brad Lanam [7e56fb] version 1.47
 ex1.tcl 2019-09-16 Brad Lanam Brad Lanam [accb87] 1.27 fix column weight issues
 ex2.tcl 2019-09-23 Brad Lanam Brad Lanam [e2bac8] version 1.29: protect grab; mac os; -relief; de...
 ex3.tcl 2019-09-16 Brad Lanam Brad Lanam [accb87] 1.27 fix column weight issues
 ex4.tcl 2019-09-16 Brad Lanam Brad Lanam [accb87] 1.27 fix column weight issues
 ex5.tcl 2019-09-18 Brad Lanam Brad Lanam [2faf99] clean up
 ex6.tcl 2019-09-17 Brad Lanam Brad Lanam [03e2ff] examples
 ex7.tcl 2019-09-29 Brad Lanam Brad Lanam [c41953] add example
 ex8.tcl 2019-09-29 Brad Lanam Brad Lanam [58b520] example 8
 ex9.tcl 2019-10-17 Brad Lanam Brad Lanam [f00b16] add ex9
 flexfb.tcl 2020-02-25 Brad Lanam Brad Lanam [41e00f] fix cascade bugs introduced in 1.40
 flexmenu.tcl 2021-01-17 Brad Lanam Brad Lanam [970f64] mac os fixes
 mkpkg.sh 2020-10-21 Brad Lanam Brad Lanam [7e56fb] version 1.47
 mkpkgidx.sh 2020-10-21 Brad Lanam Brad Lanam [7e56fb] version 1.47
 pkgIndex.tcl 2021-01-17 Brad Lanam Brad Lanam [970f64] mac os fixes
 push.sh 2020-12-15 Brad Lanam Brad Lanam [221f63] push script

Read Me

Files:

  flexmenu.tcl      main package
  ex[0-9].tcl       example scripts
  i/                images for ex4.tcl
  flexfb.tcl        file browser example using flexmenu

Disadvantages:

  * Does not work with .toplevel configure -menu .mymenu.
    Tk uses the internal menu API to attach menus.
    flexmenu cannot work with the -menu option.
  * Must use pack or grid (or place) to attach the menu.
    Converting an existing program to use flexmenu could be quite painful.
  * The main menu must be created with either -type menubar or -type menuleft.
  * It has not been tested much.

Advantages:

  * Allows multiple menus to be active at the same time. You can have a main menu, a couple of toolbars and a side menu active
    all at the same time.
  * Easier to create toolbars.

Features:

  * Supports left side menus (-type menuleft).
  * Scrolling menus (-maxheight).
  * Configure -columnbreak <value> at the menu level to automatically
    break every <value> items.
  * -keepopen option will leave the menu open after invoking an item.
  * -acceleratorfont, -acceleratorforeground and
    -acceleratoractiveforeground options.
  * -activerelief option.
  * -hidearrows option.
  * -hideaccelerators option.
  * -bindaccelerators option.
  * -acceleratorprefix option to set the default accelerator prefix.
  * -padx, -pady options to change the padding for menu items.
  * -bindaccelerators option.
  * -stickycascade option.
  * -clicktoopen option.
  * Is a little more dynamic than the standard menu.
    Many things can be reconfigured and the changes will be picked up.

Item Features:

   * Any widget can be put into the menu (.mymenu add widget -widget .mymenu.mycombobox).
   * tearoff item type.  (The -tearoff 1 option will automatically add
     a tearoff item).  The tearoff item is a label and the text and
     image may be configured.
   * Margin images (-marginimage).  It is quite common nowadays to use small icons on the left margin of the menu as an aid for the user.
   * Accelerator labels are automatically generated based on either an & prefix in the label, the -underline option, or the -accelerator option.
   * Accelerator bindings are automatically generated.
   * -activerelief option.
   * -gap option.
   * -keepopen option.
   * Cascades: -yalign, -xalign, -precommand

Notes:

  * Ignored: -bitmap, -selectcolor.
  * -hidemargin works properly on a per-entry basis.
    menu seems to treat it as a menu option even though it is specified per entry.
    I think -hidemargin would be better off as a menu option rather than an item option,
    but backwards compatibility is an issue.

Problems:

  * May be overeager in generating accelerator labels.
    The user may not want accelerator labels displayed for every item.
  * Has not been tested much.
  * At this time, flexmenu does not check to see if the entire menu is
    visible, and does not do any relocation of the menu.

Known Issues:

  * The clone command has only a very basic implementation.
  * Flicker with -selectimage.
    Currently, the menu layout is reapplied when a -image is changed
    to a -selectimage.
    This is just in case the -selectimage is a different size.
    If the assumption can be made that the image sizes are identical, this
    redraw could be removed.
  * The MacOS aqua theme cannot set background colors, so the
    active highlight changes the text color rather than the background color.
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.