LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-02-2012, 11:59 PM   #1
manojb
LQ Newbie
 
Registered: Aug 2012
Posts: 7

Rep: Reputation: Disabled
Lightbulb How to create a kdialog menu with multiple user input?


I am using kdialog in my software. I am very new to kdialog. My application does something like this:

kdialog --title "Name" --inputbox "Name of the User">>/tmp/name.txt
kdialog --title "Age" --inputbox "Age of the User">>/tmp/age.txt

With the above code, user has to provide the name, press OK and then provide age and press OK.

But my requirement is to have a dialog box which would take all the inputs at once in a single scree and then press OK at once.
Ex:
The screen should look like :

Name: <Input by user>
Age: <Input by user>

<OK>
 
Old 09-04-2012, 02:50 AM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
manojb, your last post has no relationship to the thread topic. You should really open up a new thread when you have new questions.

But to answer it, it appears that kdialog is too limited to do what you want all at once. It only has a small selection of box options and isn't very configurable. Most of the gui dialog programs are limited to some extent.

zenity is able to do it, however, with its --forms dialog.

Code:
zenity --forms --text="Enter your data" --add-entry="Name: " --add-entry="Age: " --separator=$'\n'
 
1 members found this post helpful.
Old 09-04-2012, 10:54 AM   #3
manojb
LQ Newbie
 
Registered: Aug 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
Dear David Sir,

First of all, thanks a lot for such an awesome and useful information regarding zenity. This is completely new knowledge which you provided to me. This became so useful to me.

Regarding the new thread issue,

I knew, I had to start a new thread..But for some reason, the new thread was not letting me post my query. Hence, I had to continue posting the query in my old thread.

--
Thanks,
Manoj

Last edited by manojb; 09-04-2012 at 10:55 AM.
 
Old 10-20-2012, 03:42 PM   #4
manojb
LQ Newbie
 
Registered: Aug 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
As I had mentioned earlier, for some reason, I am getting the following message when I am trying to submit a new thread:

You do not have permission to create tags. You may only use existing tags.

Hence posting a new thread in the existing thread:

Subject: Drop down list box in Zenity form

I have used the following code where the user will input his age:

value=$(zenity --forms --title "Window title" --width=400 --height=100 --text="Insert your age" --add-entry="Age ")

I want to provide a drop down menu in --add-entry, where user would select from the age listed from say 1 to 100.
 
Old 10-23-2012, 04:10 AM   #5
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
@manojb: I've moved your question to a new thread for better exposure. If you have problem submitting new threads, you may contact the LQ administrator using this form. Describe your problem in detail and ask to fix it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create multiple input box in same window using dialog kalpeer Linux - General 1 09-10-2012 05:25 AM
[SOLVED] bash script: wait for input from kdialog before doing sth. musonio Linux - Software 3 05-30-2011 12:28 PM
Create a Multiple files by reading a input file and changing the contents bhargavkr Linux - Newbie 4 09-17-2009 01:37 AM
kdialog --menu command tardigrade Programming 2 01-17-2006 02:37 PM
How to show a variable menu list in Kdialog? linx win Debian 1 11-26-2005 11:33 AM


All times are GMT -5. The time now is 07:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration