Re: Dynamic Dialog generation
- From: "Emmanuel Deloget" <logout free fr>
- To: <bob aldigital co uk>, <gtk-perl-list gnome org>
- Subject: Re: Dynamic Dialog generation
- Date: Mon, 4 Dec 2000 16:46:42 +0100
Hello
I've been trying to emulate the functionality of a
CGI program through the Perl interface to Glade.
I think, however, I'm approaching this wrongly...
I want an application to have the ability to display
a dialog box, with, for example, one input box and
two checkboxes. If the user entered 7 into the
input box and checked both of the boxes, I would
like then to be able to display a subsequent dialog
box which contained seven pairs of input boxes.
i.e. the contents of the second dialog box is
dependent on the values entered to the first. Of
course, I'd then like to tie the values entered to
the second dialog box via callbacks to the original
application.
I started by designing an application in Glade, and then
(I'm ashamed to admit) I took a sample Glade XML file and
then hacked it into pieces with a text editor, then
re-constructed an XML file whose content was governed
by the values entered in the first dialog. Then I used
Glade::PerlGenerate->Form_from_Glade_File which actually
created me the dialog box I sought. However, all my
attempts to connect any signals associated with
this dialog box to my application came to nought.
Realising that my inelegant hack was perhaps best
left alone, I have decided to solicit any suggestion from
this list.
This is really a strange hack :)
Remember that GTK+ is a widget library. You can allways
create an empty dialog, a container and then add the
needed widgets to this container. **pseudo** code should
look like that (sorry, I'm not a Perl guru :)
dial = dialog_new
c = container_new
dial.add(c);
do n times
w = widget_new
c.add(w)
end do
You may have a look to any existing perl-gtk+ program
to get the right syntax.
Yours,
Bob
--
The chief enemy of creativity is "good" sense -- Picasso
Not every time :)
--
Emmanuel DELOGET - tel: 04 42 16 88 46
IMAGUS S.A. - imagus online fr
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]