Re: Dynamic Dialog generation



On Sat, Dec 09, 2000 at 12:05:22PM -0500, gtk-perl-list-request gnome org wrote:

Message: 1
Date: Fri, 08 Dec 2000 03:32:12 +0000
From: Dermot Musgrove <dermot glade perl connectfree co uk>
To: Bob Wilkinson <bob wibble uklinux net>,
"gtk-perl-list gnome org" <gtk-perl-list gnome org>
Subject: Re: Dynamic Dialog generation

Bob Wilkinson wrote:

[...]
Oops, I think that you've misunderstood my example. 
Sorry.


Probably my fault...

I wanted to be able 
to enter any (integral) number into the input box, and have the facility 
to set any of the checkboxes (in the real example I have 9). Dependent 
on the state of the checkboxes, I 'd like to (when set) provide a new 
input box for the user to be able to enter data. So if 3 of the 9
checkboxes were set, I'd like to put input boxes in sets of 3 on the 
next dialog.

I can do all of this statically by providing sets of 9 input boxes, but 
if I know that they're unnecessary, it saves me a lot of hitting the 
tab key, by not displaying them.

I would like the number of sets of input boxes to be governed by the 
number entered into the first dialog.
Have you looked at $widget->hide() as a solution. I reckon that if you 
build a dialog with 9 input boxes with predictable names you can then do

  $window->FORM->{"text$i"}->hide;
  $i++;

in a loop in the signal handler that constructs or raises the dialog. If
you are reusing the dialog you may need to call 

  $window->FORM->{"text$i"}->show;

to make them visible again.
 

Thanks - $widget->hide was the solution I sought. 

Basically, I needed to make my second form a superset of all of those 
permitted, and use the first to mask the unwanted input boxes. I 
typically wanted a fairly sparse form, derived from the second under control 
of the first.

[...]
I have been using Glade and your Perl interface. I think that I would be
able to use the Gtk Perl interface to effect what I'd like to do, but I was
curious as to how this should be done from within the Glade paradigm.
I hope that I am nearer this time. Please let me know how you get on - it
is a great help to me to know what people are really developing.

Regards, Dermot


Thanks very much for your assistance, Dermot. I'll let you know when I'm
finished.

Bob




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]