Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

tk_optionmenu(1t) [opensolaris man page]

tk_optionMenu(1T)					       Tk Built-In Commands						 tk_optionMenu(1T)

__________________________________________________________________________________________________________________________________________________

NAME
tk_optionMenu - Create an option menubutton and its menu SYNOPSIS
tk_optionMenu w varName value ?value value ...? _________________________________________________________________ DESCRIPTION
This procedure creates an option menubutton whose name is w, plus an associated menu. Together they allow the user to select one of the values given by the value arguments. The current value will be stored in the global variable whose name is given by varName and it will also be displayed as the label in the option menubutton. The user can click on the menubutton to display a menu containing all of the val- ues and thereby select a new value. Once a new value is selected, it will be stored in the variable and appear in the option menubutton. The current value can also be changed by setting the variable. The return value from tk_optionMenu is the name of the menu associated with w, so that the caller can change its configuration options or manipulate it in other ways. KEYWORDS
option menu ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +--------------------+-----------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +--------------------+-----------------+ |Availability | SUNWTk | +--------------------+-----------------+ |Interface Stability | Uncommitted | +--------------------+-----------------+ NOTES
Source for Tk is available on http://opensolaris.org. Tk 4.0 tk_optionMenu(1T)

Check Out this Related Man Page

ttk::menubutton(n)						 Tk Themed Widget						ttk::menubutton(n)

__________________________________________________________________________________________________________________________________________________

NAME
ttk::menubutton - Widget that pops down a menu when pressed SYNOPSIS
ttk::menubutton pathName ?options? _________________________________________________________________ DESCRIPTION
A ttk::menubutton widget displays a textual label and/or image, and displays a menu when pressed. STANDARD OPTIONS
-class -compound -cursor -image -state -style -takefocus -text -textvariable -underline -width See the ttk_widget manual entry for details on the standard options. WIDGET-SPECIFIC OPTIONS [-direction direction] Specifies where the menu is to be popped up relative to the menubutton. One of: above, below, left, right, or flush. The default is below. flush pops the menu up directly over the menubutton. [-menu menu] Specifies the path name of the menu asso- ciated with the menubutton. To be on the safe side, the menu ought to be a direct child of the menubutton. WIDGET COMMAND
Menubutton widgets support the standard cget, configure, identify, instate, and state methods. No other widget methods are used. SEE ALSO
ttk::widget(n), menu(n), menubutton(n) KEYWORDS
widget, button, menu Tk 8.5 ttk::menubutton(n)
Man Page

15 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

case statement based on file availability

I need to make a select menu that gives options dynamically based on whether certain files are available. For instance: PS3="Open which readme? " select readme in This That do case "$readme" in This) open -a /Applications/TextEdit.app This.txt;; That) open -a... (6 Replies)
Discussion started by: Loriel
6 Replies

2. Shell Programming and Scripting

reappearing menu list using select

is there a way I can make the menu list reappear when I use select ? ----- menulist="Change_title Remove_tag Change_tag Add_line Quit" select word in $menulist #change_title remove_tag change_tag add_line quit do case $word in # first menu option Change Title ... (9 Replies)
Discussion started by: forever_49ers
9 Replies

3. Shell Programming and Scripting

Script to selct an option

Dear experts, Im trying to create a script which will allow me to do the following: 1) log in with a username and password. 2) select an option. this is how the menu looks: Select one of the following options: 1 - Activation Menu 2 - Troubleshooting Menu 3 - New... (3 Replies)
Discussion started by: lweegp
3 Replies

4. Shell Programming and Scripting

Desperate for help with menu coding

I am extremely desperate for help with this menu coding problem I'm having. Whenver I go to execute my script file, I keep getting an error message that says the following: option: Undefined variable. I implore someone to PUH-LEEZE point me in the right direction. I can't stress my... (21 Replies)
Discussion started by: sinjin
21 Replies

5. UNIX for Dummies Questions & Answers

Scripting help

Hi, I have an assignment for my Unix class to write a program asking a user to enter a number. the user then chooses an option from a menu of whether they want to count down to zero from the number they entered, or count up from zero to the number. The error i keep getting is binary operator... (4 Replies)
Discussion started by: tiney83
4 Replies

6. UNIX for Dummies Questions & Answers

Not able to get value in the variable

alert_val=$( db2 "select value (( select distinct 1 from opus.alerts where alname = 'MQ_FAILURE_INTERFACE' and aldatetime > current timestamp - 20 minutes),0) from sysibm.sysdummy1 with ur" | sed -n '/--/ {n; p;}') Can some one please tell me why alert_val is not able to get the return value... (5 Replies)
Discussion started by: mamta
5 Replies

7. Shell Programming and Scripting

menu selections

I am trying to find a way to allow users to select multiple options in a shell menu. I am using case and it gives menu options 1-9, how can I set this up so that it give the user the ability to choose more then one option, ie 1,2 or 3,4,5, etc... (4 Replies)
Discussion started by: lwif
4 Replies

8. UNIX for Dummies Questions & Answers

script to ask the user to select a number

hi all, I have 4 scripts which i would need to run 1. BP.sh 2.DB.sh 3.LK.sh 4.TB.sh I would like write a script which would ask the user to select a number from 1-4 accordingly and run only that script for him/her I succeeded till reading the user input but not sure how to run that... (5 Replies)
Discussion started by: family_guy
5 Replies

9. Shell Programming and Scripting

Find a variable in a file and replace its value

HI , I can't find a solution to the following: In a simple menu script I want to capture the input from the user with "read" and use it as a value in a variable Rempages="some_value" which is in a different script file. So I have to perform a search and replace for this variable and only... (4 Replies)
Discussion started by: svetoslav_sj
4 Replies

10. Shell Programming and Scripting

Output to console and to log

I have a menu based script where user will select different action via displayed menu. I want to log all the action or say whatever displayed on screen to a log file and want to achieve with in the same script. i tried named pipe as below.. logfile=mylogfile mkfifo ${logfile}.pipe... (3 Replies)
Discussion started by: vidyadhar85
3 Replies

11. Shell Programming and Scripting

Select command help with blank input value

I have a select menu driven script using a case statment and cannot control what happens after a user's input is just <ENTER> or the <SPACEBAR>+<ENTER>. I want it to just hit the "MAIN" function and not redraw the options. I've look everywhere for the answer and am at a loss. Here's the code:... (4 Replies)
Discussion started by: ambroze
4 Replies

12. Shell Programming and Scripting

Automate the menu options using shell script

I have a menu option which will look as follows Select a menu option 1.change password 2.login as root user 3.show system version 4.quit Select> 1 please enter the new password: unix reenter the new password: unix press any key to enter (then displays again the menu options to enter the... (4 Replies)
Discussion started by: shivakumar6g
4 Replies

13. Shell Programming and Scripting

Case sensitive in If loop .

Hi All, select app from the menu: ABC DEF GHI JKL ALL # ALL will select all the apps in the menu echo "Enter your option" read option; if then <execute the below command> elif # option is the 1 selection from menu...not ALL <execute the below command> else (14 Replies)
Discussion started by: Devaraj A
14 Replies

14. Shell Programming and Scripting

Ignore special characters in loop

Hi All, select app from the menu: ABC DEF GHI JKL ALL # ALL will select all the apps in the menu echo "Enter your option" read option; if then <execute the below command> elif # option is the 1 selection from menu...not ALL <execute the below command> else echo wrong... (6 Replies)
Discussion started by: Devaraj A
6 Replies

15. Shell Programming and Scripting

Help with 'select' for menu input

A lot of my scripting makes use of the 'select' command to create menu driven input. A typical example of how I use it is as: somevar='' PS3='Select one: ' while ]; do select somevar in $(sqlplus -s $dbuser/$dbpw@mydb <<EOF set echo off feedback off verify off... (7 Replies)
Discussion started by: edstevens
7 Replies