LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   How to create multiple input box in same window using dialog (http://www.linuxquestions.org/questions/linux-general-1/how-to-create-multiple-input-box-in-same-window-using-dialog-4175426474/)

kalpeer 09-10-2012 04:00 AM

How to create multiple input box in same window using dialog
 
Hi All,

I was trying to generate GUI using shell script. After long search I found the utility called “dialog”. Using this utility I am able to generate window to collect the input.
Code:

Quote:

dialog --inputbox "Input 1" 10 45
dialog --inputbox "Input 2" 10 45
dialog --inputbox "Input 3" 10 45

Using the above commands I am able to collect the three inputs in GUI. But here it opens three different Windows to collect the three inputs.
I want to have single window to collect all these three inputs.

Could you please help me in this.
Is there any other utility apart from dialog to achieve this.

Thanks,
Kalai

kalpeer 09-10-2012 04:25 AM

After long search i got how to use form. Form helps us to use multiple text field.

dialog --backtitle "Dialog Form Example" --title "Dialog - Form" \
--form "\nDialog Sample Label and Values" 25 60 16 \
"Form Label 1:" 1 1 "Value 1" 1 25 25 30 \
"Form Label 2:" 2 1 "Value 2" 2 25 25 30 \
"Form Label 3:" 3 1 "Value 3" 3 25 25 30 \
"Form Label 4:" 4 1 "Value 4" 4 25 25 30 \
2>/tmp/form.$$


All times are GMT -5. The time now is 11:46 AM.