MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Tk Built-In Commands                                 tkpopup(1T)





NAME
     tkpopup - Post a popup menu

SYNOPSIS
     tkpopup menu x y ?entry?



DESCRIPTION
     This procedure posts a menu  at  a  given  position  on  the
     screen  and  configures Tk so that the menu and its cascaded
     children can be traversed with the mouse  or  the  keyboard.
     Menu  is  the name of a menu widget and x and y are the root
     coordinates at which to display the menu.  If entry is omit-
     ted  or  an  empty  string,  the menu's upper left corner is
     positioned at the given point.  Otherwise  entry  gives  the
     index of an entry in menu and the menu will be positioned so
     that the entry is positioned over the given point.

EXAMPLE
     How to attach a simple popup menu to a widget.
          # Create a menu
          set m [menu .popupMenu]
          $m add command -label "Example 1" -command bell
          $m add command -label "Example 2" -command bell

          # Create something to attach it to
          pack [label .l -text "Click me!"]

          # Arrange for the menu to pop up when the label is clicked
          bind .l <1> {tkpopup .popupMenu %X %Y}


SEE ALSO
     bind(1T), menu(1T), tkoptionMenu(1T)


KEYWORDS
     menu, popup

ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:










Tk                      Last change: 4.0                        1






Tk Built-In Commands                                 tkpopup(1T)



     
       ATRIBUTE TYPE     ATRIBUTE VALUE
    
     Availability         SUNWTk         
    
     Interface Stability  Uncommitted    
    

NOTES
     Source for Tk is available on http:/opensolaris.org.













































Tk                      Last change: 4.0                        2



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™