LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-29-2009, 10:29 AM   #1
shivarajM
LQ Newbie
 
Registered: Apr 2009
Posts: 22

Rep: Reputation: 15
Arrow Dymically determing the number of check list in Zenity, How?


hi,
In my project i cannot determine the number of check list initially... I will know dynamically during execution... so How to specify the number of check list dynamically in zenity

Waiting for your precious Answer.....
 
Old 04-29-2009, 04:28 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
You can count it on fly and then pass those options to zenity to a load dialog box or whatever. If you have working or pseudo code to show paste it here or explain in more detail.
 
Old 04-30-2009, 12:17 AM   #3
shivarajM
LQ Newbie
 
Registered: Apr 2009
Posts: 22

Original Poster
Rep: Reputation: 15
Arrow Determine number of checklist in zenity dynamically...

Quote:
Originally Posted by unSpawn View Post
You can count it on fly and then pass those options to zenity to a load dialog box or whatever. If you have working or pseudo code to show paste it here or explain in more detail.

In my Shell Script i am counting the duplicate IPs in LAN,...After counting i have to show in checklist in zenity which one to delete from the LAN........so initially i dont know no. of duplicate IPs in the LAN....Hence i can determine how many check list needed.....

Duplicate IPs may range from 1 to 15......
 
Old 04-30-2009, 03:01 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Post your code you got sofar, OK?
 
Old 04-30-2009, 06:38 AM   #5
shivarajM
LQ Newbie
 
Registered: Apr 2009
Posts: 22

Original Poster
Rep: Reputation: 15
Arrow how to place variable number of cheklist

Quote:
Originally Posted by unSpawn View Post
Post your code you got sofar, OK?

case "$n" in
1) ans=$(zenity --list --text "Tick to Restore....?" --checklist --column "Pick" --column "options" TRUE "$1" --separator=":") ;;
2) ans=$(zenity --list --text "Tick the IP that U want to Restore....?" --checklist --column "Pick" --column "options" TRUE "$1" TRUE "$2" --separator=":") ;;
3) ans=$(zenity --list --text "Tick the IP that U want to Restore....?" --checklist --column "Pick" --column "options" TRUE "$1" TRUE "$2" TRUE "$3" --separator=":") ;;
4) ans=$(zenity --list --text "Tick the IP that U want to Restore....?" --checklist --column "Pick" --column "options" TRUE "$1" TRUE "$2" TRUE "$3" TRUE "$4" --separator=":") ;;
0) zenity --info --text "No Duplicate IP Restored....\!"
esac

----I want to avoid this case because checklist may go up to 15 or 20
 
Old 04-30-2009, 06:57 AM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
It would help to also have some form of input list as you generated it. Either scrub the IP's or make up a list.
 
  


Reply

Tags
checklist, zenity


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 can i check that $1 is number... DoME69 Programming 10 03-09-2009 02:08 PM
how to check number of opened handles ruj.sabya Linux - General 2 08-06-2007 08:37 AM
List total number of directories paraiso Linux - Newbie 5 04-18-2005 04:04 AM
Check to see that a file is bigger than a certain number of MB linAM Programming 3 02-17-2005 12:42 PM
How to check the network port number? sceadu Linux - Networking 2 11-15-2004 10:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:39 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
Open Source Consulting | Domain Registration