<menu-button> re-text/labling

From: <Paul.Emsley_at_chem.gla.ac.uk>
Date: Fri, 6 Oct 2000 16:32:37 +0100

       Hello,

       Consider the following:


(require "Tk-classes")

(define mb (make <Menu-Button>
             :text "none"
             :relief "raised"
             :indicator-on #t))

(define mb-menu (make <Menu> :parent mb))
(pack mb :padx 4 :pady 4)

(map (lambda (x)
       (menu-add mb-menu 'command
                 :label x
                 :command (lambda() (format #t "~s~%" x))))
     (list "one" "two" "three"))


     All very fine so far.

     Now, I want the menu-button to change to the appropriate button
      label when I select that label (i.e. selecting "one" turns
      "none" to "one").

      How do I do that?

      How should I have found this out on my own?

      Thanks,

      Paul.
Received on Fri Oct 06 2000 - 16:32:52 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST